修复掠夺数据存储错误
This commit is contained in:
parent
3a20b2c342
commit
d6bf9b0505
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user