aa
This commit is contained in:
@@ -420,6 +420,18 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE
|
||||
"url": storeSku.Img3,
|
||||
})
|
||||
}
|
||||
if storeSku.Img4 != "" {
|
||||
photos = append(photos, map[string]interface{}{
|
||||
"is_master": false,
|
||||
"url": storeSku.Img4,
|
||||
})
|
||||
}
|
||||
if storeSku.Img5 != "" {
|
||||
photos = append(photos, map[string]interface{}{
|
||||
"is_master": false,
|
||||
"url": storeSku.Img5,
|
||||
})
|
||||
}
|
||||
params = map[string]interface{}{
|
||||
// "name": utils.LimitMixedStringLen(storeSku.SkuName, ebaiapi.MaxSkuNameByteCount),
|
||||
"left_num": model.MaxStoreSkuStockQty,
|
||||
|
||||
@@ -172,9 +172,9 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
param.ShopCategories = append(param.ShopCategories, utils.Str2Int64(sku.VendorCatID))
|
||||
}
|
||||
if sku.ImgMix != "" {
|
||||
param.Images = jxutils.BatchString2Slice(sku.ImgMix, sku.Img2, sku.Img3)
|
||||
param.Images = jxutils.BatchString2Slice(sku.ImgMix, sku.Img2, sku.Img3, sku.Img4, sku.Img5)
|
||||
} else {
|
||||
param.Images = jxutils.BatchString2Slice(sku.Img, sku.Img2, sku.Img3)
|
||||
param.Images = jxutils.BatchString2Slice(sku.Img, sku.Img2, sku.Img3, sku.Img4, sku.Img5)
|
||||
}
|
||||
|
||||
if param.CategoryID == 0 {
|
||||
|
||||
@@ -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), ",")
|
||||
|
||||
Reference in New Issue
Block a user