比赛场数据保存

This commit is contained in:
by 2024-07-04 09:55:54 +08:00
parent 0e372fea74
commit a757b4bbf9
2 changed files with 3 additions and 1 deletions

2
public

@ -1 +1 @@
Subproject commit 6c801eab0d99ba3c8878278677bb5ef17a1370bd Subproject commit aef8c489a27508831d69b4f66dee10c5258abb92

View File

@ -1630,6 +1630,7 @@ func (this *Tournament) Update() {
nowTime := time.Now() nowTime := time.Now()
if nowTime.Hour() == 0 && nowTime.Minute() == 0 && nowTime.Second() == 0 { if nowTime.Hour() == 0 && nowTime.Minute() == 0 && nowTime.Second() == 0 {
this.MatchAwardNum = make(map[string]map[int32]int32) this.MatchAwardNum = make(map[string]map[int32]int32)
this.Save()
logger.Logger.Trace("比赛场每日库存清理!!!当前时间 %v", nowTime) logger.Logger.Trace("比赛场每日库存清理!!!当前时间 %v", nowTime)
} }
} }
@ -1639,6 +1640,7 @@ func (this *Tournament) Shutdown() {
this.Save() this.Save()
} }
func (this *Tournament) Save() { func (this *Tournament) Save() {
logger.Logger.Info("保存比赛场每日奖励数据!!!!", this.MatchAwardNum)
if this.MatchAwardNum == nil { if this.MatchAwardNum == nil {
return return
} }