Commit f39b5e7f by mushishixian

Merge branch 'ysx-sku服务-20201215'

parents 48312c60 4f24663d
...@@ -60,7 +60,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan ...@@ -60,7 +60,6 @@ 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哪里写入(成意写的)
......
...@@ -393,20 +393,15 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) { ...@@ -393,20 +393,15 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
//合并spu的信息 //合并spu的信息
func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku { func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
var spu model.Spu sku.UpdateTime = gjson.Get(spuStr,"update_time").Int()
err := json.Unmarshal([]byte(spuStr), &spu) sku.ClassID1 = int(gjson.Get(spuStr,"class_id1").Int())
if err != nil { sku.ClassID2 = int(gjson.Get(spuStr,"class_id2").Int())
return sku sku.SpuName = gjson.Get(spuStr,"spu_name").String()
} sku.SpuBrief =gjson.Get(spuStr,"spu_brief").String()
sku.UpdateTime = spu.UpdateTime sku.SpuDetail = gjson.Get(spuStr,"spu_detail").String()
sku.ClassID1 = spu.ClassID1 sku.Status = int(gjson.Get(spuStr,"status").Int())
sku.ClassID2 = spu.ClassID2 sku.Encap = gjson.Get(spuStr,"encap").String()
sku.SpuName = spu.SpuName sku.Content = gjson.Get(spuStr,"spu_name").String()
sku.SpuBrief = spu.SpuBrief
sku.SpuDetail = spu.SpuDetail
sku.Status = spu.Status
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