- AutoSaleStoreSku添加参数isNeedSync控制是否主动同步,定时任务不需要,因为马上就是每晚的定时同步
This commit is contained in:
@@ -2181,7 +2181,7 @@ func GetMissingStoreSkuFromOrder(ctx *jxcontext.Context, fromTime time.Time) (mi
|
||||
return missingList, err
|
||||
}
|
||||
|
||||
func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int) (err error) {
|
||||
func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int, isNeedSync bool) (err error) {
|
||||
db := dao.GetDB()
|
||||
storeSkuList, err := dao.GetAutoSaleStoreSku(db, storeIDs)
|
||||
if err != nil {
|
||||
@@ -2206,7 +2206,7 @@ func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int) (err error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(skuIDs) > 0 {
|
||||
if isNeedSync && len(skuIDs) > 0 {
|
||||
if _, err = CurVendorSync.SyncStoresSkus(ctx, db, nil, []int{storeID}, skuIDs, false, true, true); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user