This commit is contained in:
gazebo
2019-03-13 15:13:05 +08:00
parent 9266534bab
commit be8d7fc110

View File

@@ -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 num == 0 || !isAsync {
if num == 0 || !isAsync || hint == "" {
hint = utils.Int64ToStr(num)
}
return hint, err
@@ -523,7 +523,8 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBind
t1.id real_sku_id, t1.spec_quality, t1.spec_unit,
t3.price sku_name_price, t3.unit sku_name_unit
FROM sku t1
LEFT JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND store_id = ? AND t2.deleted_at = ?
JOIN store ts ON t2.id = ? AND ts.deleted_at = ?
LEFT JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND t2.store_id = t2.id AND t2.deleted_at = ?
JOIN sku_name t3 ON t1.name_id = t3.id AND t3.deleted_at = ?
WHERE t1.name_id = ? AND t1.deleted_at = ?
FOR UPDATE`
@@ -531,6 +532,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBind
storeID,
utils.DefaultTimeValue,
utils.DefaultTimeValue,
utils.DefaultTimeValue,
skuBindInfo.NameID,
utils.DefaultTimeValue,
}
@@ -732,7 +734,7 @@ func UpdateStoresSkusSale(ctx *jxcontext.Context, storeIDs []int, skuBindSkuInfo
db := dao.GetDB()
hint, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, storeIDs, skuIDs, isAsync, isContinueWhenError)
}
if num == 0 || !isAsync {
if num == 0 || !isAsync || hint == "" {
hint = utils.Int64ToStr(num)
}
return hint, err