Commit 9c5872de by 杨树贤

优化判断

parent 830b728c
Showing with 3 additions and 0 deletions
......@@ -17,6 +17,9 @@ func (sc *CustomPrice) getCustomPriceList(sku model.LySku) (customPriceList []mo
redisCon := gredis.Conn("default_r")
defer redisCon.Close()
customPriceRule, _ := redis.String(redisCon.Do("HGET", "cube_custom_price", sku.OrgId))
if customPriceRule=="" {
return customPriceList, nil
}
customPriceRuleArr := gjson.Get(customPriceRule, "price_list").Array()
//这里是价格规则
for _, customPriceRule := range customPriceRuleArr {
......
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