From 715a697aaccfe9861b51278be9a93054e21f4cd8 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 30 Jan 2024 17:47:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E5=A1=94=E8=B5=9B=E5=AD=A3?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_getcycle.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/pagoda/api_getcycle.go b/modules/pagoda/api_getcycle.go index e57bb10ae..b8ad20f0e 100644 --- a/modules/pagoda/api_getcycle.go +++ b/modules/pagoda/api_getcycle.go @@ -21,7 +21,7 @@ func (this *apiComp) GetCycle(session comm.IUserSession, req *pb.PagodaGetCycleR err error update map[string]interface{} ) - + update = make(map[string]interface{}, 0) list, err = this.module.modelCyclePagoda.getPagodaCycleList(session.GetUserId()) if err != nil { errdata = &pb.ErrorData{ @@ -38,13 +38,22 @@ func (this *apiComp) GetCycle(session comm.IUserSession, req *pb.PagodaGetCycleR update["rtime"] = list.Etime list.Itype = data.Itype update["itype"] = list.Itype + list.Data = make(map[int32]*pb.CycleData) + update["data"] = list.Data + list.Maxfloor = 0 + update["maxfloor"] = list.Maxfloor + list.Battlecount = 0 + update["battlecount"] = list.Battlecount + list.Rtime = configure.Now().Unix() + update["rtime"] = list.Rtime } if !utils.IsToday(list.Rtime) { - update = make(map[string]interface{}, 0) list.Rtime = configure.Now().Unix() list.Battlecount = 0 update["battlecount"] = list.Battlecount update["rtime"] = list.Rtime + } + if len(update) > 0 { if err = this.module.modelCyclePagoda.ModifyPagodaCycleData(session.GetUserId(), update); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError,