From d6cb45c9bbe36f5c4059a4871a02bf0c744a6fbb Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 25 May 2019 13:02:12 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E9=A5=BF=E7=99=BE=E4=B8=AD=E5=9C=A8?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=AD=A5=E8=87=B3=E5=B9=B3=E5=8F=B0=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=EF=BC=8C=E5=88=9B=E5=BB=BAsku=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=94=9F=E6=88=90=E5=81=87=E7=9A=84ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/ebai/store_sku.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/ebai/store_sku.go b/business/partner/purchase/ebai/store_sku.go index c0e64f322..f2b633e79 100644 --- a/business/partner/purchase/ebai/store_sku.go +++ b/business/partner/purchase/ebai/store_sku.go @@ -273,6 +273,8 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks if storeSku.Img != "" { if globals.EnableEbaiStoreWrite { storeSku.EbaiID, err = api.EbaiAPI.SkuCreate(strStoreID, storeSku.SkuID, genSkuParamsFromStoreSkuInfo(storeSku)) + } else { + storeSku.EbaiID = jxutils.GenFakeID() } if err == nil { updateFields = append(updateFields, model.FieldEbaiID) @@ -290,7 +292,7 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks updateFields = nil } } else if storeSku.EbaiSyncStatus&model.SyncFlagStoreSkuModifiedMask != 0 { - if storeSku.EbaiID == 0 { + if jxutils.IsEmptyID(storeSku.EbaiID) { err = fmt.Errorf("京西数据异常,修改一个没有创建的饿百商品:%d, store:%s", storeSku.SkuID, strStoreID) } else { if storeSku.Img != "" {