同步银豹到京西修改

This commit is contained in:
苏尹岚
2020-05-11 10:19:21 +08:00
parent ae5737f243
commit 971cc8afa0

View File

@@ -888,12 +888,15 @@ func (d *SyncErrResultLock) AppendData(syncErrResult SyncErrResult) {
func (v *VendorSync) SyncStoreSkusFromYb(ctx *jxcontext.Context, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
var (
vendorID = model.VendorIDYB
db = dao.GetDB()
)
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)
}
hint, err = v.LoopStoresMap(ctx, dao.GetDB(), 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 {
hint, err = syncStoreSkusFromYb(ctx, v.StoreID, vendorID, v.VendorStoreID, isAsync, isContinueWhenError)
}
return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
}, isContinueWhenError)
return hint, err
}