syncStoreSkuNew添加参数:causeFlag

This commit is contained in:
gazebo
2020-01-15 18:20:27 +08:00
parent 6dc177da70
commit 36b8cfb1f1
8 changed files with 27 additions and 38 deletions

View File

@@ -799,7 +799,7 @@ func UpdateStoresSkus(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*St
isAsync = asyncStoreSkuOpFilter(ctx, isAsync)
num = int64(len(skuIDs))
if num > 0 {
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
}
if num == 0 || !isAsync || hint == "" {
hint = utils.Int64ToStr(num)
@@ -846,7 +846,7 @@ func UpdateStoresSkusByBind(ctx *jxcontext.Context, parentTask tasksch.ITask, sk
isAsync = asyncStoreSkuOpFilter(ctx, isAsync)
if num > 0 {
skuIDs := jxutils.IntMap2List(skuIDMap)
hint, err = CurVendorSync.SyncStoresSkus(ctx, parentTask, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
hint, err = CurVendorSync.SyncStoresSkus(ctx, parentTask, 0, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
}
if num == 0 || !isAsync || hint == "" {
hint = utils.Int64ToStr(num)
@@ -1317,7 +1317,7 @@ func UpdateStoresSkusSale(ctx *jxcontext.Context, storeIDs []int, skuBindSkuInfo
skuIDs = append(skuIDs, v.SkuID)
}
db := dao.GetDB()
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
}
if num == 0 || !isAsync || hint == "" {
hint = utils.Int64ToStr(num)
@@ -2198,7 +2198,7 @@ func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int, isNeedSync bool) (
}
}
if isNeedSync && len(skuIDs) > 0 {
if _, err = CurVendorSync.SyncStoresSkus(ctx, nil, db, nil, []int{storeID}, skuIDs, false, true, true); err != nil {
if _, err = CurVendorSync.SyncStoresSkus(ctx, nil, model.SyncFlagSaleMask, db, nil, []int{storeID}, skuIDs, false, true, true); err != nil {
return err
}
}