定时刷新商品可售状态
This commit is contained in:
@@ -654,13 +654,13 @@ 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) (err error) {
|
||||
func (v *VendorSync) ChangeStoreSkuSaleStatus(ctx *jxcontext.Context, isAsync, isContinueWhenError bool, storeID int) (err error) {
|
||||
var (
|
||||
storeIDs []int
|
||||
skuIDs []int
|
||||
)
|
||||
db := dao.GetDB()
|
||||
storeSkuList, err := dao.GetStoresSkusInfoBySaleTime(db)
|
||||
storeSkuList, err := dao.GetStoresSkusInfoBySaleTime(db, storeID)
|
||||
if len(storeSkuList) < 1 || err != nil {
|
||||
return errors.New(fmt.Sprintf("未查询到设置了可售时间的商品 GetStoresSkusInfoBySaleTime!err : %v", err))
|
||||
}
|
||||
@@ -677,7 +677,7 @@ func (v *VendorSync) ChangeStoreSkuSaleStatus(ctx *jxcontext.Context, isAsync, i
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetTimeMixByInt(begin1, end1, begin2, end2 int) (beginAt, endAt int) {
|
||||
func GetTimeMixByInt(begin1, end1, begin2, end2 int16) (beginAt, endAt int16) {
|
||||
if (begin1 > begin2 && begin1 > end2) || (begin2 > end1 && end2 > end1) {
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user