上传用户信息读取接口优化
This commit is contained in:
parent
96c91542d6
commit
14e2f21ad7
@ -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
|
||||
}
|
||||
|
@ -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 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("GetUser uid:%v err:%v",uid,err)
|
||||
return
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user