Commit 4bfabddd by 杨树贤

redis

parent 0a35d44a
......@@ -325,7 +325,7 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//获取关税以及价格转换
sku = ls.GetTariffAndPrice(sku)
// sku = priceService.GetComparePrice(sku)
sku = priceService.GetComparePrice(sku)
//获取新的限制库存信息
has, limitStock := ls.getLimitStock(sku.GoodsId)
if has {
......
......@@ -932,6 +932,7 @@ func (ps *PriceService) GetActivityPrice(sku model.LySku) model.LySku {
// compare_price_ratio
func (ps *PriceService) GetComparePrice(sku model.LySku) model.LySku {
redisCon := gredis.Conn("default_r")
defer redisCon.Close()
//判断是否存在
compareData, _ := redis.String(redisCon.Do("HGET", "compare_price_ratio", sku.GoodsId))
if compareData == "" {
......
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