@@ -79,6 +79,7 @@ func (masterListCfgDb *MasterListCfgDb) MasterListCfgInsert(uid, key, val, memo | |||||
} | } | ||||
func (masterListCfgDb *MasterListCfgDb) MasterListCfgUpdate(uid, key, val string) bool { | func (masterListCfgDb *MasterListCfgDb) MasterListCfgUpdate(uid, key, val string) bool { | ||||
masterListCfgDb.MasterListCfgGetOneData(uid, key) | |||||
cfg := model.MasterListCfg{K: key, V: val} | cfg := model.MasterListCfg{K: key, V: val} | ||||
_, err := masterListCfgDb.Db.Where("`k`=? and uid=?", key, uid).Cols("v").Update(&cfg) | _, err := masterListCfgDb.Db.Where("`k`=? and uid=?", key, uid).Cols("v").Update(&cfg) | ||||
if err != nil { | if err != nil { | ||||
@@ -160,14 +160,15 @@ func PlayletAdvOrderMonth() { | |||||
syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") | syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") | ||||
runtime = time.Unix(timeRange["start"], 0).Format("2006-01-02 15:04:05") | 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) | isEnd := syscfgDb.MasterListCfgGetOneData(uid, keyIsEnd) | ||||
if isEnd == "1" { | if isEnd == "1" { | ||||
return | return | ||||
} | } | ||||
var ( | 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 | pageNo int = 1 | ||||
pageSize int = 200 | pageSize int = 200 | ||||
) | ) | ||||
@@ -153,14 +153,16 @@ func PlayletVideoOrderMonth() { | |||||
syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") | syscfgDb.MasterListCfgUpdate(uid, keyIsEnd, "") | ||||
runtime = time.Unix(timeRange["start"], 0).Format("2006-01-02 15:04:05") | 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) | isEnd := syscfgDb.MasterListCfgGetOneData(uid, keyIsEnd) | ||||
if isEnd == "1" { | if isEnd == "1" { | ||||
return | return | ||||
} | } | ||||
var ( | 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 | pageNo int = 1 | ||||
pageSize int = 200 | pageSize int = 200 | ||||
) | ) | ||||