刷新商品可售状态
This commit is contained in:
@@ -778,7 +778,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
}
|
||||
notifyStoreOperatorChanged(store, valid["operatorPhone"])
|
||||
if valid["openTime1"] != 0 || valid["closeTime1"] != 0 || valid["openTime2"] != 0 || valid["closeTime2"] != 0 {
|
||||
err = CurVendorSync.ChangeStoreSkuSaleStatus(ctx, true, false, storeID)
|
||||
err = CurVendorSync.ChangeStoreSkuSaleStatus(ctx, storeID, true, false)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -654,7 +654,7 @@ func (v *VendorSync) SyncSkuNames(ctx *jxcontext.Context, nameIDs []int, isForce
|
||||
return v.SyncSkus(ctx, db, nameIDs, nil, isAsync, isContinueWhenError, ctx.GetUserName())
|
||||
}
|
||||
|
||||
func (v *VendorSync) ChangeStoreSkuSaleStatus(ctx *jxcontext.Context, isAsync, isContinueWhenError bool, storeID int) (err error) {
|
||||
func (v *VendorSync) ChangeStoreSkuSaleStatus(ctx *jxcontext.Context, storeID int, isAsync, isContinueWhenError bool) (err error) {
|
||||
var (
|
||||
storeIDs []int
|
||||
skuIDs []int
|
||||
@@ -669,7 +669,7 @@ func (v *VendorSync) ChangeStoreSkuSaleStatus(ctx *jxcontext.Context, isAsync, i
|
||||
skuIDs = append(skuIDs, v.SkuID)
|
||||
}
|
||||
vendorIDs := partner.GetPurchasePlatformVendorIDs()
|
||||
dao.UpdateStoreSkuBindSyncStatus(db, vendorIDs)
|
||||
dao.UpdateStoreSkuBindSyncStatus(db, vendorIDs, storeID)
|
||||
v.SyncStoresSkus(ctx, db, vendorIDs, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user