上传用户信息读取接口优化

This commit is contained in:
liwei1dao 2022-11-15 19:12:50 +08:00
parent 96c91542d6
commit 14e2f21ad7
2 changed files with 17 additions and 4 deletions

View File

@ -64,7 +64,7 @@ func (this *configureComp) GetMonsterById(id string) (result *cfg.GameDreamlandB
return
} else {
if result, ok = v.(*cfg.GameDreamlandBoos).GetDataMap()[id]; !ok {
err = fmt.Errorf("not found:%d ", id)
err = fmt.Errorf("not found:%s ", id)
this.module.Errorln(err)
return
}

View File

@ -73,9 +73,22 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
//获取用户
func (this *ModelUser) GetUser(uid string) (user *pb.DBUser) {
user = &pb.DBUser{}
if err := this.Get(uid, user); err != nil {
this.module.Errorf("GetUser uid:%v err:%v",uid,err)
return
// if err := this.Get(uid, user); err != nil {
// this.module.Errorf("GetUser uid:%v err:%v",uid,err)
// return
// }
if this.module.IsCross() {
if model, err := this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err != nil {
this.module.Errorln(err)
} else {
if err = model.Get(uid, user); err != nil {
this.module.Errorf("err:%v", err)
}
}
} else {
if err := this.Get(uid, user); err != nil {
this.module.Errorf("err:%v", err)
}
}
return
}