刷新物料订单的标志,每周刷新一次,每周只能申请一次

This commit is contained in:
苏尹岚
2020-04-17 16:33:27 +08:00
parent feb6dbbdf4
commit af8872b5f2
5 changed files with 68 additions and 4 deletions

View File

@@ -3083,3 +3083,17 @@ func DisabledStoreWithoutVendor(ctx *jxcontext.Context, isContinueWhenError, isA
}
return hint, err
}
func CleanStoreIsBoughtMatter(ctx *jxcontext.Context) (err error) {
//每周一凌晨1点清空
if int(time.Now().Weekday()) != 1 {
return err
}
db := dao.GetDB()
sql := `
UPDATE store SET is_bought_matter = ?
`
sqlParam := []interface{}{model.NO}
_, err = dao.ExecuteSQL(db, sql, sqlParam)
return err
}

View File

@@ -209,6 +209,9 @@ func Init() {
ScheduleTimerFunc("SendNoCatSkusToOperater", func() {
cms.SendNoCatSkusToOperater(jxcontext.AdminCtx)
}, autoPayForPopluarManList)
ScheduleTimerFunc("CleanStoreIsBoughtMatter", func() {
cms.CleanStoreIsBoughtMatter(jxcontext.AdminCtx)
}, priceReferTimeList)
}
ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)