From ba7392307e057f64ec4db63edeccb0f929d24a5b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 29 Jan 2024 11:42:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=AF=8F=E6=97=A5=E6=8C=91?= =?UTF-8?q?=E6=88=98=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/plunder/api_getlist.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/plunder/api_getlist.go b/modules/plunder/api_getlist.go index 62149e640..2d55a7358 100644 --- a/modules/plunder/api_getlist.go +++ b/modules/plunder/api_getlist.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + "go_dreamfactory/utils" ) func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PlunderGetListReq) (errdata *pb.ErrorData) { @@ -67,6 +68,15 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe update["line"] = list.Line } } + // 每日重置次数 + if !utils.IsToday(list.Ctime) { //不是同一天 可以重置数据 + list.Ctime = configure.Now().Unix() + list.Pvpcount = 0 + list.Count = 0 + update["pvpcount"] = list.Pvpcount + update["count"] = list.Count + update["ctime"] = list.Ctime + } if len(update) > 0 { this.module.modelPlunder.changePlunderData(session.GetUserId(), update) }