循环塔数据修复

This commit is contained in:
meixiongfeng 2024-01-16 14:00:08 +08:00
parent 681c1e448e
commit f200f13dfc
2 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,9 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
}
costTime = req.Report.Costtime
if _, ok := list.Data[conf.Floors]; !ok {
list.Data[conf.Floors] = &pb.CycleData{}
}
if list.Data[conf.Floors].Consttime == 0 {
list.Data[conf.Floors].Consttime = costTime
fresh = true

View File

@ -42,6 +42,7 @@ func (this *ModelCycle) getPagodaCycleList(uid string) (result *pb.DBPagodaCycle
result.Id = primitive.NewObjectID().Hex()
result.Uid = uid
result.Itype = 1
result.Data = make(map[int32]*pb.CycleData, 0)
result.Rtime = configure.Now().Unix()
if conf, e := this.module.configure.GetPagodaCirculateConf(1, 1); e == nil {
result.Etime = configure.Now().Unix() + int64(conf.Time)*24*3600