diff --git a/app/db/db_master_list_cfg.go b/app/db/db_master_list_cfg.go index 87cad4c..ce4ced2 100644 --- a/app/db/db_master_list_cfg.go +++ b/app/db/db_master_list_cfg.go @@ -79,6 +79,7 @@ func (masterListCfgDb *MasterListCfgDb) MasterListCfgInsert(uid, key, val, memo } func (masterListCfgDb *MasterListCfgDb) MasterListCfgUpdate(uid, key, val string) bool { + masterListCfgDb.MasterListCfgGetOneData(uid, key) cfg := model.MasterListCfg{K: key, V: val} _, err := masterListCfgDb.Db.Where("`k`=? and uid=?", key, uid).Cols("v").Update(&cfg) if err != nil { diff --git a/app/task/svc/svc_playlet_adv_order.go b/app/task/svc/svc_playlet_adv_order.go index d53179d..17a195f 100644 --- a/app/task/svc/svc_playlet_adv_order.go +++ b/app/task/svc/svc_playlet_adv_order.go @@ -160,14 +160,15 @@ func PlayletAdvOrderMonth() { syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") runtime = time.Unix(timeRange["start"], 0).Format("2006-01-02 15:04:05") } + syscfgDb.MasterListCfgUpdate(uid, keyStart, time.Now().Format("2006-01-02 15:04:05")) //当前是否结束了 isEnd := syscfgDb.MasterListCfgGetOneData(uid, keyIsEnd) if isEnd == "1" { return } var ( - beginTime int64 = utils.TimeStdParseUnix(runtime) - 86400 - endTime int64 = utils.TimeStdParseUnix(runtime) + beginTime int64 = utils.TimeStdParseUnix(runtime) + endTime int64 = utils.TimeStdParseUnix(runtime) + 86400 pageNo int = 1 pageSize int = 200 ) diff --git a/app/task/svc/svc_playlet_video_order.go b/app/task/svc/svc_playlet_video_order.go index 603e697..82f737e 100644 --- a/app/task/svc/svc_playlet_video_order.go +++ b/app/task/svc/svc_playlet_video_order.go @@ -153,14 +153,16 @@ func PlayletVideoOrderMonth() { syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") runtime = time.Unix(timeRange["start"], 0).Format("2006-01-02 15:04:05") } + syscfgDb.MasterListCfgUpdate(uid, keyStart, time.Now().Format("2006-01-02 15:04:05")) + //当前是否结束了 isEnd := syscfgDb.MasterListCfgGetOneData(uid, keyIsEnd) if isEnd == "1" { return } var ( - beginTime int64 = utils.TimeStdParseUnix(runtime) - 86400 - endTime int64 = utils.TimeStdParseUnix(runtime) + beginTime int64 = utils.TimeStdParseUnix(runtime) + endTime int64 = utils.TimeStdParseUnix(runtime) + 86400 pageNo int = 1 pageSize int = 200 )