爆品预警正式,每天早上8点半跑

This commit is contained in:
苏尹岚
2020-01-20 17:46:17 +08:00
parent a0fe44d600
commit 613adf9aa5
2 changed files with 7 additions and 3 deletions

View File

@@ -3357,7 +3357,6 @@ func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, i
)
db := dao.GetDB()
storeList, err := dao.GetStoresMapList(db, vendorIDs, nil, model.StoreStatusOpened, model.StoreIsSyncAll, "")
// storeList, err := dao.GetStoreList(db, nil, nil, []int{model.StoreStatusOpened, model.StoreStatusClosed, model.StoreStatusHaveRest}, nil, "")
pTask := tasksch.NewParallelTask("SendSeckillSkusCountMsg", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
store := batchItemList[0].(*model.StoreMap)
@@ -3423,7 +3422,6 @@ func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, i
}
if type1 < type1Count || type2 < type2Count {
storeDetail, _ := dao.GetStoreDetail(db, store.StoreID, store.VendorID)
fmt.Println(type1, type2, storeDetail)
var (
operatorName string
operatorPhone string

View File

@@ -88,6 +88,9 @@ var (
updateActStatusTimeList = []string{
"00:01:00",
}
sendSecKillWarnList = []string{
"8:30:00",
}
autoSaleStoreSkuTimeList = []string{
cms.AutoSaleAtStr,
@@ -159,8 +162,11 @@ func Init() {
cms.AutoFocusStoreSkusForTopSkus(jxcontext.AdminCtx, true, true)
}, createStorePriceTimeList)
ScheduleTimerFunc("GetCheckVendorCookie", func() {
event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{0, 1, 3, 102}, true)
event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM, model.VendorIDMTPS}, true)
}, checkCookieList)
ScheduleTimerFunc("SendSeckillSkusCountMsg", func() {
cms.SendSeckillSkusCountMsg(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM}, false, true)
}, sendSecKillWarnList)
ScheduleTimerFunc("每日报警心跳", func() {
globals.SugarLogger.Warnf("每日报警心跳,这不是报警。启动时间:%s", cms.GetServiceInfo(jxcontext.AdminCtx)["startupTime"])
}, dailyHeartbeat)