循环塔赛季结束清理

This commit is contained in:
meixiongfeng 2024-01-30 17:47:16 +08:00
parent 704ac9b16d
commit 715a697aac

View File

@ -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,