This commit is contained in:
苏尹岚
2021-03-17 17:35:40 +08:00
parent e0a1393eee
commit f0d41bc043
6 changed files with 84 additions and 16 deletions

View File

@@ -286,13 +286,25 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
foodData["is_sold_out"] = skuStatusJX2Mtwm(storeSku.MergedStatus)
if true { // vendorStoreID == specialStoreID {
img2 := storeSku.Img2
img3 := storeSku.Img3
img4 := storeSku.Img4
img5 := storeSku.Img5
if img2 == "" {
img2 = storeSku.Img
}
if img3 == "" {
img3 = storeSku.Img
}
if img4 == "" {
img4 = storeSku.Img
}
if img5 == "" {
img5 = storeSku.Img
}
if storeSku.ImgMix != "" && ((storeSku.BrandID == storeSku.ExBrandID && storeSku.ExBrandID != 0) || storeSku.ExBrandID == 0) {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.ImgMix, img2, storeSku.ImgMix, storeSku.ImgMix, storeSku.ImgMix), ",")
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.ImgMix, img2, img3, img4, img5), ",")
} else {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, storeSku.Img, storeSku.Img, storeSku.Img), ",")
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, img3, img4, img5), ",")
}
} else {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, storeSku.Img2), ",")