From fdb04e1b87701ab65e549225e2f5b2b38773445e Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 28 Dec 2023 15:34:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B5=8B=E8=AF=95=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/timer/vikingrank.go | 4 ++-- modules/viking/api_seasonrank.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/timer/vikingrank.go b/modules/timer/vikingrank.go index fa7e49d27..b814679aa 100644 --- a/modules/timer/vikingrank.go +++ b/modules/timer/vikingrank.go @@ -46,12 +46,12 @@ func (this *VikingRank) Start() (err error) { // 0 0 0 ? * MON // 每周一零点 cron.AddFunc("0 0 0 ? * MON", this.TimerSeason) - this.TimerSeason() + //this.TimerSeason() return } func (this *VikingRank) TimerSeason() { - endTime := utils.WeekIntervalTime() + endTime := utils.WeekIntervalTime(configure.Now().Unix()) this.module.Debugf("TimerSeason end: %d,cur time:%d", endTime, configure.Now().Unix()) if err := this.service.RpcCall( diff --git a/modules/viking/api_seasonrank.go b/modules/viking/api_seasonrank.go index 03efff675..199cc8e0e 100644 --- a/modules/viking/api_seasonrank.go +++ b/modules/viking/api_seasonrank.go @@ -3,6 +3,7 @@ package viking import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" "go_dreamfactory/sys/db" "go_dreamfactory/utils" ) @@ -61,10 +62,9 @@ func (this *apiComp) SeasonRank(session comm.IUserSession, req *pb.VikingSeasonR } } - _, etime := utils.GetMonthStartEnd() session.SendMsg(string(this.module.GetType()), VikingSeasonRankReq, &pb.VikingSeasonRankResp{ Ranks: players, - Etime: etime, + Etime: utils.WeekIntervalTime(configure.Now().Unix()), }) return }