- 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()
|
db := dao.GetDB()
|
||||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
||||||
}
|
}
|
||||||
if isAsync {
|
if num == 0 || !!isAsync {
|
||||||
hint = utils.Int64ToStr(num)
|
hint = utils.Int64ToStr(num)
|
||||||
}
|
}
|
||||||
return hint, err
|
return hint, err
|
||||||
@@ -724,13 +724,15 @@ func UpdateStoresSkusSale(ctx *jxcontext.Context, storeIDs []int, skuBindSkuInfo
|
|||||||
}
|
}
|
||||||
num += int64(len(skuIDs))
|
num += int64(len(skuIDs))
|
||||||
}
|
}
|
||||||
skuIDs := make([]int, 0)
|
if num > 0 {
|
||||||
for _, v := range skuBindSkuInfos {
|
skuIDs := make([]int, 0)
|
||||||
skuIDs = append(skuIDs, v.SkuID)
|
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()
|
if num == 0 || !isAsync {
|
||||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
|
|
||||||
if isAsync {
|
|
||||||
hint = utils.Int64ToStr(num)
|
hint = utils.Int64ToStr(num)
|
||||||
}
|
}
|
||||||
return hint, err
|
return hint, err
|
||||||
|
|||||||
Reference in New Issue
Block a user