From d35134fae09f834f122df7a60a2fc61ac277ac72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 11 Jun 2020 17:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=90=8E=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jdshop/store_sku.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 662920ccf..b85493b58 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -793,9 +793,11 @@ func buildUpdateSkusParam(storeSku *dao.StoreSkuSyncInfo, v *dao.StoreSkuSyncInf break } } - if ggValueID == 0 { //说明没有建这个规格,要建上 - catID, _ := api.JdShopAPI.SaveVenderAttrValue(specQuality, attrIDs["规格"], int(storeSku.VendorVendorCatID), maxNo+1) - ggValueID = catID + if isCreate { + if ggValueID == 0 { //说明没有建这个规格,要建上 + catID, _ := api.JdShopAPI.SaveVenderAttrValue(specQuality, attrIDs["规格"], int(storeSku.VendorVendorCatID), maxNo+1) + ggValueID = catID + } } attrSku := &jdshopapi.CreateSkuParamAttrs{ AttrID: utils.Int2Str(attrIDs["规格"]),