From f3c17d93ddda3967112c5fcabd5a34959a375824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 12 Jul 2023 17:23:13 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tao_vegetable/store_sku2.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 5caf851b4..710765b42 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -254,7 +254,7 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync } else { updateSku.PurchaseQuantity = utils.Int64ToPointer(int64(v.MinOrderCount)) // 起购单位 } - updateSku.SkuPicUrls = uploadImg(api, []string{v.ImgOrigin, v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) + updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) updateSkuList = append(updateSkuList, updateSku) if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || index+model.YES == totalCount { param.ParamList = &updateSkuList @@ -329,7 +329,7 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku RichText: utils.String2Pointer(storeSku.Name), AllowAppSale: utils.Int64ToPointer(tao_vegetable.IsAllowAppSale), } - sku.SkuPicUrls = uploadImg(api, []string{storeSku.ImgOrigin, storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg}) + sku.SkuPicUrls = uploadImg(api, []string{storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg}) if sku.SkuPicUrls == nil { continue } @@ -415,7 +415,10 @@ func uploadImg(api *tao_vegetable.API, imgs []string) *string { result = append(result, newImg) } } - + // 商品图片最多五张 + if len(result) > 5 { + return utils.String2Pointer(strings.Join(result[1:], ",")) + } return utils.String2Pointer(strings.Join(result, ",")) }