Commit a516aa21 by mushishixian

兼容默认值问题

parent d1c73493
Showing with 2 additions and 2 deletions
...@@ -49,9 +49,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri ...@@ -49,9 +49,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
redisCon := gredis.Conn("default_r") redisCon := gredis.Conn("default_r")
defer redisCon.Close() defer redisCon.Close()
priceRatio, _ := redis.String(redisCon.Do("HGET", "magic_cube_price_rule_v2", sku.Canal)) priceRatio, _ := redis.String(redisCon.Do("HGET", "magic_cube_price_rule_v2", sku.Canal))
//拿不到就直接返回空价格,防止低价售卖 //拿不到就去取默认的
if priceRatio == "" { if priceRatio == "" {
return nil, nil priceRatio, _ = redis.String(redisCon.Do("GET", "magic_cube_price_rule_v2_default"))
} }
//这是用来展示在商品服务的价格系数,专营的系数和代购的不一样,所以要转换一下展示形式 //这是用来展示在商品服务的价格系数,专营的系数和代购的不一样,所以要转换一下展示形式
//是否有设置最低利润点阶梯,不足5个阶梯时,最高阶梯对应的最小利润点阶梯 //是否有设置最低利润点阶梯,不足5个阶梯时,最高阶梯对应的最小利润点阶梯
......
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