Commit d44d3bc6 by 杨树贤

部分优化

parent 9e449996
Showing with 2 additions and 1 deletions
...@@ -69,11 +69,12 @@ func (qs *ZiyingService) GetActivity(skuInfo string) (priceActivity model.PriceA ...@@ -69,11 +69,12 @@ func (qs *ZiyingService) GetActivity(skuInfo string) (priceActivity model.PriceA
spuId := gjson.Get(skuInfo, "spu_id").String() spuId := gjson.Get(skuInfo, "spu_id").String()
redisCon := gredis.Conn("default_r") redisCon := gredis.Conn("default_r")
redisConSpu := gredis.Conn("spu") redisConSpu := gredis.Conn("spu")
spuStr, _ := redis.String(redisConSpu.Do("HGET", "spu", spuId))
defer func() { defer func() {
redisCon.Close() redisCon.Close()
redisConSpu.Close() redisConSpu.Close()
}() }()
spuStr, _ := redis.String(redisConSpu.Do("HGET", "spu", spuId))
if spuStr == "" { if spuStr == "" {
standardBrandId = 0 standardBrandId = 0
} else { } else {
......
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