Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
0412d525
Commit
0412d525
authored
Aug 12, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into jielong
parents
6dd3a3e6
9f0879f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
ElasticGoodService.php
application/services/goods/ElasticGoodService.php
+1
-1
MarketingService.php
application/services/marketing/MarketingService.php
+19
-15
No files found.
application/services/goods/ElasticGoodService.php
View file @
0412d525
...
@@ -159,7 +159,7 @@ class ElasticGoodService
...
@@ -159,7 +159,7 @@ class ElasticGoodService
$result
[
"list"
][
$key
][
"life_account_id"
]
=
$source
[
"_source"
][
"life_account_id"
];
$result
[
"list"
][
$key
][
"life_account_id"
]
=
$source
[
"_source"
][
"life_account_id"
];
$result
[
"list"
][
$key
][
"life_account_name"
]
=
$source
[
"_source"
][
"life_account_name"
];
$result
[
"list"
][
$key
][
"life_account_name"
]
=
$source
[
"_source"
][
"life_account_name"
];
$result
[
"list"
][
$key
][
"life_account_icon"
]
=
$source
[
"_source"
][
"life_account_icon"
];
$result
[
"list"
][
$key
][
"life_account_icon"
]
=
$source
[
"_source"
][
"life_account_icon"
];
$result
[
"list"
][
$key
][
"distance"
]
=
empty
(
end
(
$source
[
"sort"
])
)
?
""
:
round
(
end
(
$source
[
"sort"
]),
2
)
.
"km"
;
$result
[
"list"
][
$key
][
"distance"
]
=
empty
(
$source
[
"sort"
]
)
?
""
:
round
(
end
(
$source
[
"sort"
]),
2
)
.
"km"
;
$result
[
"list"
][
$key
][
"update_time"
]
=
$source
[
"_source"
][
"update_time"
];
$result
[
"list"
][
$key
][
"update_time"
]
=
$source
[
"_source"
][
"update_time"
];
}
}
}
}
...
...
application/services/marketing/MarketingService.php
View file @
0412d525
...
@@ -278,6 +278,7 @@ class MarketingService
...
@@ -278,6 +278,7 @@ class MarketingService
$publishLifeAccountIds
=
array_unique
(
array_column
(
$marketingPindanData
,
"publish_life_account_id"
));
$publishLifeAccountIds
=
array_unique
(
array_column
(
$marketingPindanData
,
"publish_life_account_id"
));
$lifeAccountList
=
CommonService
::
getlifeAccountList
([
'life_account_id'
=>
$publishLifeAccountIds
]);
$lifeAccountList
=
CommonService
::
getlifeAccountList
([
'life_account_id'
=>
$publishLifeAccountIds
]);
$defaultPic
=
"SHQ_goods_0_012Xh1AQcMqu"
;
foreach
(
$list
as
$key
=>
$value
)
{
foreach
(
$list
as
$key
=>
$value
)
{
$lists
[
$key
]
=
$value
;
$lists
[
$key
]
=
$value
;
$lists
[
$key
][
"online_status_desc"
]
=
Marketing
::
$onlineStatusDesc
[
$value
[
"online_status"
]];
$lists
[
$key
][
"online_status_desc"
]
=
Marketing
::
$onlineStatusDesc
[
$value
[
"online_status"
]];
...
@@ -296,7 +297,8 @@ class MarketingService
...
@@ -296,7 +297,8 @@ class MarketingService
$lists
[
$key
][
"pindan_desc"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"pindan_desc"
];
$lists
[
$key
][
"pindan_desc"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"pindan_desc"
];
$lists
[
$key
][
"participate_number"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"participate_number"
];
$lists
[
$key
][
"participate_number"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"participate_number"
];
$strList
=
explode
(
","
,
$priceData
[
$value
[
"marketing_id"
]][
"pindan_pic"
]);
$shareDefaultStr
=
empty
(
$priceData
[
$value
[
"marketing_id"
]][
"pindan_pic"
])
?
$defaultPic
:
$priceData
[
$value
[
"marketing_id"
]][
"pindan_pic"
];
$strList
=
explode
(
","
,
$shareDefaultStr
);
$shareStr
=
$strList
[
0
];
$shareStr
=
$strList
[
0
];
$shareRes
=
Ks3Api
::
picEncryptUrl
(
$shareStr
,
500
,
400
);
$shareRes
=
Ks3Api
::
picEncryptUrl
(
$shareStr
,
500
,
400
);
$shareUrl
=
empty
(
$shareRes
[
"response"
][
"data"
][
"url"
])
?
""
:
$shareRes
[
"response"
][
"data"
][
"url"
];
$shareUrl
=
empty
(
$shareRes
[
"response"
][
"data"
][
"url"
])
?
""
:
$shareRes
[
"response"
][
"data"
][
"url"
];
...
@@ -474,19 +476,19 @@ class MarketingService
...
@@ -474,19 +476,19 @@ class MarketingService
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
$clearPrice
=
!
empty
(
$value
[
"clear_price"
])
?
$value
[
"clear_price"
]
*
100
:
0
;
$clearPrice
=
!
empty
(
$value
[
"clear_price"
])
?
$value
[
"clear_price"
]
*
100
:
0
;
$price
=
!
empty
(
$value
[
"price"
])
?
$value
[
"price"
]
*
100
:
0
;
$price
=
!
empty
(
$value
[
"price"
])
?
$value
[
"price"
]
*
100
:
0
;
if
(
$commissionMode
==
Marketing
::
COMMISSION_MODE_RATE
)
{
//
if ($commissionMode == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal
=
(
$firstCommissionRate
+
$secondCommissionRate
)
/
1000
*
$price
;
//
$commissionTotal = ($firstCommissionRate + $secondCommissionRate) / 1000 * $price;
if
(
$price
-
$commissionTotal
<
$clearPrice
)
{
//
if ($price - $commissionTotal < $clearPrice) {
throw
new
GoodsException
([
'cus'
=>
36
]);
//
throw new GoodsException(['cus' => 36]);
}
//
}
}
//
}
//
if
(
$commissionMode
==
Marketing
::
COMMISSION_MODE_FIXED
)
{
//
if ($commissionMode == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal
=
(
$firstCommissionRate
+
$secondCommissionRate
);
//
$commissionTotal = ($firstCommissionRate + $secondCommissionRate);
if
(
$price
-
$commissionTotal
<
$clearPrice
)
{
//
if ($price - $commissionTotal < $clearPrice) {
throw
new
GoodsException
([
'cus'
=>
36
]);
//
throw new GoodsException(['cus' => 36]);
}
//
}
}
//
}
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'goods_spu_id'
]
=
$value
[
'goods_spu_id'
];
$colums
[
$key
][
'goods_spu_id'
]
=
$value
[
'goods_spu_id'
];
...
@@ -912,7 +914,9 @@ class MarketingService
...
@@ -912,7 +914,9 @@ class MarketingService
$marketingData
[
"participate_number"
]
=
$pindanMarketing
[
"participate_number"
];
$marketingData
[
"participate_number"
]
=
$pindanMarketing
[
"participate_number"
];
$marketingData
[
"create_time"
]
=
$marketingInfo
[
"create_time"
];
$marketingData
[
"create_time"
]
=
$marketingInfo
[
"create_time"
];
$strList
=
explode
(
","
,
$marketingData
[
"pindan_pic"
]);
$defaultPic
=
"SHQ_goods_0_012Xh1AQcMqu"
;
$shareDefaultStr
=
empty
(
$marketingData
[
"pindan_pic"
])
?
$defaultPic
:
$marketingData
[
"pindan_pic"
];
$strList
=
explode
(
","
,
$shareDefaultStr
);
$shareStr
=
$strList
[
0
];
$shareStr
=
$strList
[
0
];
$shareRes
=
Ks3Api
::
picEncryptUrl
(
$shareStr
,
500
,
400
);
$shareRes
=
Ks3Api
::
picEncryptUrl
(
$shareStr
,
500
,
400
);
$shareUrl
=
empty
(
$shareRes
[
"response"
][
"data"
][
"url"
])
?
""
:
$shareRes
[
"response"
][
"data"
][
"url"
];
$shareUrl
=
empty
(
$shareRes
[
"response"
][
"data"
][
"url"
])
?
""
:
$shareRes
[
"response"
][
"data"
][
"url"
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment