This commit is contained in:
aozhiwei 2024-06-22 11:14:45 +08:00
parent 5d018eaf37
commit 5c9b53af10

View File

@ -4,6 +4,7 @@ import (
"q5"
"f5"
"time"
"fmt"
"main/constant"
)
@ -22,11 +23,16 @@ func (this* goldBullionReturn) loadExpiredGoldBullion() {
var lastIdx int64
for true {
hasNextData := false
nowTime := f5.GetApp().GetRealSeconds()
expiredTime := nowTime - 3600 * 24 - 60 * 5
sql := fmt.Sprintf(`
SELECT * FROM t_gold_bullion WHERE idx > %d AND activated = 0 AND createtime < %d LIMIT 1000`,
lastIdx,
expiredTime)
f5.GetGoStyleDb().RawQuery(
constant.GAME_DB,
"SELECT * FROM t_gold_bullion WHERE idx > ? LIMIT 1000",
sql,
[]string{
q5.ToString(lastIdx),
},
func (err error, ds *f5.DataSet) {
if err == nil {