Commit 1c68ef1c by 杨树贤

Merge branch 'ysx-价格体系修改-20230815' into dev

parents e24ada75 f1d51788
Showing with 4 additions and 1 deletions
...@@ -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, sku.SupplierId)) discountRatio, _ := redis.String(redisCon.Do("HGET", discountRatioRedisKey, supplierKey))
checkNullRation := gjson.Get(discountRatio, "ration").String() checkNullRation := gjson.Get(discountRatio, "ration").String()
//如果这个渠道没有对应的折扣系数,那么就去读取全局的 //如果这个渠道没有对应的折扣系数,那么就去读取全局的
if discountRatio == "" || checkNullRation == "{}" { if discountRatio == "" || checkNullRation == "{}" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment