Commit 48312c60 by mushishixian

Merge branch 'ysx-sku服务-20201215'

parents c71dc91c f300aca5
...@@ -60,6 +60,7 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan ...@@ -60,6 +60,7 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku := model.InitSkuData(skuStr) sku := model.InitSkuData(skuStr)
sku.GoodsId = goodsId sku.GoodsId = goodsId
spu := spuList[sku.SpuId] spu := spuList[sku.SpuId]
sku.Content = spu
//读取包装字段的缓存 //读取包装字段的缓存
if sku.SupplierId == 7 { if sku.SupplierId == 7 {
//sku_raw_map哪里写入(成意写的) //sku_raw_map哪里写入(成意写的)
...@@ -201,8 +202,6 @@ func (ls *LyService) getSpuList(skuArr map[string]string) (spuList map[string]st ...@@ -201,8 +202,6 @@ func (ls *LyService) getSpuList(skuArr map[string]string) (spuList map[string]st
spuId := gjson.Get(skuStr, "spu_id").String() spuId := gjson.Get(skuStr, "spu_id").String()
spuIds = append(spuIds, spuId) spuIds = append(spuIds, spuId)
} }
redisConn := gredis.Conn("default_r")
defer redisConn.Close()
//批量获取spu详情 //批量获取spu详情
spuList = gredis.Hmget("default_r", "spu", spuIds) spuList = gredis.Hmget("default_r", "spu", spuIds)
return return
......
...@@ -406,6 +406,7 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku { ...@@ -406,6 +406,7 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
sku.SpuDetail = spu.SpuDetail sku.SpuDetail = spu.SpuDetail
sku.Status = spu.Status sku.Status = spu.Status
sku.Encap = spu.Encap sku.Encap = spu.Encap
sku.Content = spuStr
return sku return sku
} }
......
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