Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1c68ef1c
authored
Aug 17, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-价格体系修改-20230815' into dev
parents
e24ada75
f1d51788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
service/service_price.go
service/service_price.go
View file @
1c68ef1c
...
@@ -374,15 +374,18 @@ func (ps *PriceService) GetDiscountRatio(sku model.LySku) model.LySku {
...
@@ -374,15 +374,18 @@ func (ps *PriceService) GetDiscountRatio(sku model.LySku) model.LySku {
discountRatioRedisKey
:=
"magic_cube_channel_discount_daigou"
discountRatioRedisKey
:=
"magic_cube_channel_discount_daigou"
discountRatioDefaultRedisKey
:=
"magic_cube_channel_discount_default_daigou"
discountRatioDefaultRedisKey
:=
"magic_cube_channel_discount_default_daigou"
var
supplierKey
interface
{}
supplierKey
=
sku
.
SupplierId
if
sku
.
SupplierId
==
17
{
if
sku
.
SupplierId
==
17
{
discountRatioRedisKey
=
"magic_cube_channel_discount_zhuanying"
discountRatioRedisKey
=
"magic_cube_channel_discount_zhuanying"
discountRatioDefaultRedisKey
=
"magic_cube_channel_discount_default_zhuanying"
discountRatioDefaultRedisKey
=
"magic_cube_channel_discount_default_zhuanying"
supplierKey
=
sku
.
Canal
}
}
//先去读取成本折扣系数
//先去读取成本折扣系数
//找一个标志位,因为默认的全局折扣系数的数据格式和非全局的是不一样的
//找一个标志位,因为默认的全局折扣系数的数据格式和非全局的是不一样的
isDefaultDiscountRatio
:=
false
isDefaultDiscountRatio
:=
false
discountRatio
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
discountRatioRedisKey
,
s
ku
.
SupplierId
))
discountRatio
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
discountRatioRedisKey
,
s
upplierKey
))
checkNullRation
:=
gjson
.
Get
(
discountRatio
,
"ration"
)
.
String
()
checkNullRation
:=
gjson
.
Get
(
discountRatio
,
"ration"
)
.
String
()
//如果这个渠道没有对应的折扣系数,那么就去读取全局的
//如果这个渠道没有对应的折扣系数,那么就去读取全局的
if
discountRatio
==
""
||
checkNullRation
==
"{}"
{
if
discountRatio
==
""
||
checkNullRation
==
"{}"
{
...
...
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