From 1edb98d9f677d269d78146231ea7bec5b808a53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 9 Aug 2023 16:01:51 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tao_vegetable/store_sku2.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 0408b587a..40db59398 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -532,18 +532,11 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri } } - if taoImgs.Img == "" && taoImgs.Img2 == "" && taoImgs.Img3 == "" && taoImgs.Img4 == "" && taoImgs.Img5 == "" && taoImgs.DescImg == "" { - return nil - } - - taoImgs.SkuID = skuId - taoImgs.VendorID = vendorId if isCreate { + taoImgs.SkuID = skuId + taoImgs.VendorID = vendorId dao.CreateEntity(dao.GetDB(), taoImgs) - } else { - dao.UpdateEntity(dao.GetDB(), taoImgs, "Img", "Img2", "Img3", "Img4", "Img5", "DescImg") } - // 商品图片最多五张 if len(result) > 5 { return utils.String2Pointer(strings.Join(result[1:], ","))