美团商品水印测试

This commit is contained in:
苏尹岚
2020-06-17 14:28:21 +08:00
parent 9ef7c6fe2b
commit c952496572
2 changed files with 11 additions and 3 deletions

View File

@@ -246,9 +246,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
syncType = "更新商品"
}
for i, storeSku := range storeSkuList {
isNeedUpdatePrice := isCreate //storeSku.SkuSyncStatus&( model.SyncFlagPriceMask| model.SyncFlagNewMask) != 0
isNeedUpdatePrice := storeSku.SkuSyncStatus&(model.SyncFlagPriceMask|model.SyncFlagNewMask) != 0
foodData := make(map[string]interface{})
foodDataList[i] = foodData
foodDataList[i] = foodData
foodData[mtwmapi.KeyAppFoodCode] = utils.Int2Str(storeSku.SkuID)
skus := []map[string]interface{}{
map[string]interface{}{
@@ -277,7 +277,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
if img2 == "" {
img2 = storeSku.Img
}
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, storeSku.Img, storeSku.Img, storeSku.Img), ",")
if storeSku.ImgMix != "" {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.ImgMix, img2, storeSku.ImgMix, storeSku.ImgMix, storeSku.ImgMix), ",")
} else {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, storeSku.Img, storeSku.Img, storeSku.Img), ",")
}
} else {
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, storeSku.Img2), ",")
}