修复掠夺数据存储错误

This commit is contained in:
liwei1dao 2024-01-25 17:49:42 +08:00
parent 3a20b2c342
commit d6bf9b0505

View File

@ -22,7 +22,7 @@ func (this *modelRecord) Init(service core.IService, module core.IModule, comp c
func (this *modelRecord) getPlunderRecordData(id string) (info *pb.DBPlunderRecord, err error) {
info = &pb.DBPlunderRecord{}
if err = this.Get(id, info); err == mgo.MongodbNil {
if err = this.GetByID(id, info); err == mgo.MongodbNil {
info.Id = id
err = this.Add(id, info)
return
@ -31,7 +31,7 @@ func (this *modelRecord) getPlunderRecordData(id string) (info *pb.DBPlunderReco
}
func (this *modelRecord) changePlunderRecordData(id string, update map[string]interface{}) (err error) {
err = this.Change(id, update)
err = this.ChangeById(id, update)
return
}