From f0230498761ea3381a9d97352e21b65c39e83e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Sat, 9 May 2020 10:08:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=93=B6=E8=B1=B9=E5=88=B0?= =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E6=94=B9=E6=88=90=E9=9D=9E=E5=B9=B6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 614003c07..b9b36a168 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -890,15 +890,11 @@ func (v *VendorSync) SyncStoreSkusFromYb(ctx *jxcontext.Context, storeIDs []int, vendorID = model.VendorIDYB db = dao.GetDB() ) - hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("从银豹平台同步商品到京西:%v", storeIDs), isAsync, true, []int{vendorID}, storeIDs, - func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) { - loopMapInfo := batchItemList[0].(*LoopStoreMapInfo) - for _, v := range loopMapInfo.StoreMapList { - syncStoreSkusFromYb(ctx, v.StoreID, vendorID, v.VendorStoreID, isAsync, isContinueWhenError) - } - return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID) - }, isContinueWhenError) - return hint, makeSyncError(err) + storeMapList, err := dao.GetStoresMapList2(db, []int{vendorID}, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", false) + for _, v := range storeMapList { + hint, err = syncStoreSkusFromYb(ctx, v.StoreID, vendorID, v.VendorStoreID, isAsync, isContinueWhenError) + } + return hint, err } func syncStoreSkusFromYb(ctx *jxcontext.Context, storeID, vendorID int, vendorStoreID string, isAsync, isContinueWhenError bool) (hint string, err error) {