- fix return value for update store sku apis
This commit is contained in:
@@ -443,7 +443,7 @@ func UpdateStoresSkus(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*St
|
||||
db := dao.GetDB()
|
||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
||||
}
|
||||
if isAsync {
|
||||
if num == 0 || !!isAsync {
|
||||
hint = utils.Int64ToStr(num)
|
||||
}
|
||||
return hint, err
|
||||
@@ -724,13 +724,15 @@ func UpdateStoresSkusSale(ctx *jxcontext.Context, storeIDs []int, skuBindSkuInfo
|
||||
}
|
||||
num += int64(len(skuIDs))
|
||||
}
|
||||
skuIDs := make([]int, 0)
|
||||
for _, v := range skuBindSkuInfos {
|
||||
skuIDs = append(skuIDs, v.SkuID)
|
||||
if num > 0 {
|
||||
skuIDs := make([]int, 0)
|
||||
for _, v := range skuBindSkuInfos {
|
||||
skuIDs = append(skuIDs, v.SkuID)
|
||||
}
|
||||
db := dao.GetDB()
|
||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
||||
}
|
||||
db := dao.GetDB()
|
||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
||||
if isAsync {
|
||||
if num == 0 || !isAsync {
|
||||
hint = utils.Int64ToStr(num)
|
||||
}
|
||||
return hint, err
|
||||
|
||||
Reference in New Issue
Block a user