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
bae1c94b
Commit
bae1c94b
authored
Oct 09, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改
parent
f56a963d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
GoodsService.php
application/services/goods/GoodsService.php
+2
-1
MarketingService.php
application/services/marketing/MarketingService.php
+2
-1
No files found.
application/services/goods/GoodsService.php
View file @
bae1c94b
...
...
@@ -42,6 +42,7 @@ use App\Exception\custom\InterfaceException;
class
GoodsService
{
const
CHARGEFEE
=
0.006
;
const
CLEARPRICEMAX
=
2000
;
/**
* 通过发号器拿 id (非雪花)
* number,获取店铺shop_id用生活号id后两位,商品相关的这里是shop_id的后两位
...
...
@@ -916,7 +917,7 @@ class GoodsService
*/
private
static
function
checkClearPrice
(
$goodsSkuId
,
$skuParams
)
{
$clearPrice
=
$skuParams
[
"clear_price"
]
;
$clearPrice
=
!
empty
(
$skuParams
[
"clear_price"
])
?
$skuParams
[
"clear_price"
]
+
self
::
CLEARPRICEMAX
:
0
;
$price
=
$skuParams
[
"price"
];
$chargeFee
=
!
empty
(
$price
)
?
(
float
)
bcmul
(
$price
,
self
::
CHARGEFEE
,
2
)
:
0
;
//手续费 (分)
if
(
$chargeFee
<
1
)
{
...
...
application/services/marketing/MarketingService.php
View file @
bae1c94b
...
...
@@ -30,6 +30,7 @@ class MarketingService
const
ONLINE_LIFE_ACCOUNT_ID
=
"19019625839230981"
;
const
ONLINE_LIFE_ACCOUNT_ID_TEST
=
"17963416161910792"
;
const
CHARGEFEE
=
0.006
;
const
CLEARPRICEMAX
=
2000
;
//
/**
* 写死的自营生活号
* @return string
...
...
@@ -550,7 +551,7 @@ class MarketingService
$goodCount
=
!
empty
(
$goodsSkuId
)
?
count
(
$goodsSkuId
)
:
0
;
$goodsSkuList
=
GoodsSku
::
select
(
'*'
,
[
'goods_sku_id'
=>
$goodsSkuId
]);
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
$clearPrice
=
!
empty
(
$value
[
"clear_price"
])
?
$value
[
"clear_price"
]
:
0
;
$clearPrice
=
!
empty
(
$value
[
"clear_price"
])
?
$value
[
"clear_price"
]
+
self
::
CLEARPRICEMAX
:
0
;
$price
=
!
empty
(
$value
[
"price"
])
?
$value
[
"price"
]
:
0
;
$chargeFee
=
!
empty
(
$price
)
?
(
float
)
bcmul
(
$price
,
self
::
CHARGEFEE
,
2
)
:
0
;
//手续费 (分)
if
(
$chargeFee
<
1
)
{
...
...
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