Commit 35ad01e9 by mushishixian

分类获取的判断条件

parent 53346117
Showing with 2 additions and 2 deletions
...@@ -41,8 +41,8 @@ func (ls *LyService) GetGoodsClass(sku model.LySku, spu string) model.LySku { ...@@ -41,8 +41,8 @@ func (ls *LyService) GetGoodsClass(sku model.LySku, spu string) model.LySku {
spuClassId1 := gjson.Get(spu, "class_id1").Int() spuClassId1 := gjson.Get(spu, "class_id1").Int()
spuClassId2 := gjson.Get(spu, "class_id2").Int() spuClassId2 := gjson.Get(spu, "class_id2").Int()
spuClassId3 := gjson.Get(spu, "class_id3").Int() spuClassId3 := gjson.Get(spu, "class_id3").Int()
if spuClassId3 != 0 { if spuClassId2 != 0 {
sku.ClassName = ls.GetCacheClass(spuClassId3) sku.ClassName = ls.GetCacheClass(spuClassId2)
sku.ClassName3 = ls.GetCacheClass(spuClassId3) sku.ClassName3 = ls.GetCacheClass(spuClassId3)
sku.ClassName2 = ls.GetCacheClass(spuClassId2) sku.ClassName2 = ls.GetCacheClass(spuClassId2)
sku.ClassName1 = ls.GetCacheClass(spuClassId1) sku.ClassName1 = ls.GetCacheClass(spuClassId1)
......
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