This commit is contained in:
meixiongfeng 2023-04-28 21:06:47 +08:00
commit 03c533719d

View File

@ -37,21 +37,31 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond
}
if v, ok := record.Vals[cfg.Id]; ok {
this.moduleRtask.Debug("覆盖更新前",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "v", Value: v},
log.Field{Key: "paramLen", Value: paramLen},
log.Field{Key: "vals", Value: vals},
log.Field{Key: "cfgId", Value: cfg.Id},
)
v.Data = hasUpdateData(paramLen, v, vals...)
if len(v.Data) > 0 {
this.moduleRtask.Debug("覆盖更新",
this.moduleRtask.Debug("覆盖更新后",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "v", Value: v.Data},
log.Field{Key: "paramLen", Value: paramLen},
log.Field{Key: "vals", Value: vals},
log.Field{Key: "cfgId", Value: cfg.Id},
)
if len(v.Data) > 0 {
update := map[string]interface{}{
"vals": record.Vals,
}
if err = this.Change(uid, update); err != nil {
this.moduleRtask.Error("更新失败",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "update", Value: update})
return
}
}
} else {
data := &pb.RtaskData{