From bd3871aa10a82b1249943608d78e0d7779cf0375 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Thu, 4 Jul 2024 10:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=B5=9B=E5=9C=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/tournament.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 06879c9..ea7676e 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -1625,16 +1625,12 @@ func (this *Tournament) Update() { } } } - //零点清除每日库存数据 - // 获取当前时间 - nowTime := time.Now() - if nowTime.Hour() == 0 && nowTime.Minute() == 0 && nowTime.Second() == 0 { - this.MatchAwardNum = make(map[string]map[int32]int32) - this.Save() - logger.Logger.Trace("比赛场每日库存清理!!!当前时间 %v", nowTime) - } } - +func (this *Tournament) OnDayTimer() { + this.MatchAwardNum = make(map[string]map[int32]int32) + this.Save() + logger.Logger.Trace("比赛场每日库存清理!!!") +} func (this *Tournament) Shutdown() { // 保存数据 this.Save()