From bf3e825f113711a0c6185825d52357fe795a228b Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 21 Aug 2019 08:34:32 +0800 Subject: [PATCH] =?UTF-8?q?-=20SyncStoresSkus2=E4=B8=AD=EF=BC=8C=E5=BD=93s?= =?UTF-8?q?etSyncStatus=E4=B8=8D=E4=B8=BA0=E6=97=B6=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E8=A6=81=E5=A4=84=E7=90=86=E7=9B=B8=E5=BA=94=E9=97=A8=E5=BA=97?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=89=8D=E8=AE=BE=E7=BD=AE=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E6=A0=87=E5=BF=97=EF=BC=88=E4=B9=8B=E5=89=8D=E6=98=AF=E4=B8=80?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=85=A8=E9=83=A8=E8=AE=BE=E7=BD=AE=E6=A0=87?= =?UTF-8?q?=E5=BF=97=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 1446574e3..d0e0a79b6 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -369,9 +369,6 @@ func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, db *dao.DaoDB, vend func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) { loopMapInfo := batchItemList[0].(*LoopStoreMapInfo) if handler := v.GetStoreHandler(loopMapInfo.VendorID); handler != nil { - if setSyncStatus != 0 { - dao.SetStoreSkuSyncStatus(db, loopMapInfo.VendorID, storeIDs, skuIDs, setSyncStatus) - } parallelCount := 5 if model.MultiStoresVendorMap[loopMapInfo.VendorID] == 1 { parallelCount = 1 @@ -380,6 +377,9 @@ func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, db *dao.DaoDB, vend tasksch.NewParallelConfig().SetParallelCount(parallelCount).SetIsContinueWhenError(isContinueWhenError), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { storeMap := batchItemList[0].(*model.StoreMap) + if setSyncStatus != 0 { + dao.SetStoreSkuSyncStatus(db, storeMap.VendorID, []int{storeMap.StoreID}, skuIDs, setSyncStatus) + } if _, err = v.proxySyncStoreSku(ctx, task, storeMap, nil, skuIDs, excludeSkuIDs, false, isContinueWhenError); err != nil { globals.SugarLogger.Debugf("SyncStoresSkus2 failed2 store:%d failed with error:%v", storeMap.StoreID, err) }