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
sku := model.InitSkuData(skuStr)
sku.GoodsId = goodsId
spu := spuList[sku.SpuId]
sku.Content = spu
//读取包装字段的缓存
if sku.SupplierId == 7 {
//sku_raw_map哪里写入(成意写的)
......
......@@ -393,20 +393,15 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
//合并spu的信息
func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
var spu model.Spu
err := json.Unmarshal([]byte(spuStr), &spu)
if err != nil {
return sku
}
sku.UpdateTime = spu.UpdateTime
sku.ClassID1 = spu.ClassID1
sku.ClassID2 = spu.ClassID2
sku.SpuName = spu.SpuName
sku.SpuBrief = spu.SpuBrief
sku.SpuDetail = spu.SpuDetail
sku.Status = spu.Status
sku.Encap = spu.Encap
sku.Content = spuStr
sku.UpdateTime = gjson.Get(spuStr,"update_time").Int()
sku.ClassID1 = int(gjson.Get(spuStr,"class_id1").Int())
sku.ClassID2 = int(gjson.Get(spuStr,"class_id2").Int())
sku.SpuName = gjson.Get(spuStr,"spu_name").String()
sku.SpuBrief =gjson.Get(spuStr,"spu_brief").String()
sku.SpuDetail = gjson.Get(spuStr,"spu_detail").String()
sku.Status = int(gjson.Get(spuStr,"status").Int())
sku.Encap = gjson.Get(spuStr,"encap").String()
sku.Content = gjson.Get(spuStr,"spu_name").String()
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