From 5defe91d3f9619ea1ee9757e32fe0871b2a13d0c 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, 30 Apr 2020 10:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=B0=E9=93=B6=E8=B1=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync_store_sku.go | 8 ++++++++ business/partner/purchase/yb/store_sku.go | 1 + 2 files changed, 9 insertions(+) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 08f1fb3b2..0ec6cbf4c 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -525,6 +525,14 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag v.Price = price } } + if len(updateList) > 0 { + rList1, _ := changeList2Yb(updateList, nil) + updateList = updateList[:] + updateList = rList1 + for _, v := range updateList { + v.YbBarCode = storeDetail.YbStorePrefix + v.YbNameSuffix + } + } if len(priceList) > 0 { _, rList2 := changeList2Yb(nil, priceList) priceList = priceList[:] diff --git a/business/partner/purchase/yb/store_sku.go b/business/partner/purchase/yb/store_sku.go index f1c660490..32f5e1053 100644 --- a/business/partner/purchase/yb/store_sku.go +++ b/business/partner/purchase/yb/store_sku.go @@ -52,6 +52,7 @@ func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, v saveProductParam := &yinbaoapi.SaveProductParam{ CategoryUid: v.VendorCatID, } + checkYbSku(v) updateYbSku(vendorStoreID, v.YbBarCode, saveProductParam) if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDYB], "修改商品")