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) {