资源跨服
This commit is contained in:
parent
8891d07d71
commit
a325afb4a7
@ -81,7 +81,18 @@ func (this *ModelUser) GetUser(uid string) (user *pb.DBUser) {
|
||||
|
||||
//设置属性
|
||||
func (this *ModelUser) updateUserAttr(uid string, data map[string]interface{}) error {
|
||||
return this.Change(uid, data)
|
||||
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.Change(uid, data); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return this.Change(uid, data)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//是否今天首次登录
|
||||
|
@ -231,6 +231,11 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
return
|
||||
}
|
||||
|
||||
userEx, err = this.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_UserExpandNull
|
||||
return
|
||||
}
|
||||
} else {
|
||||
user = this.GetUser(uid)
|
||||
userEx, err = this.GetUserExpand(uid)
|
||||
|
Loading…
Reference in New Issue
Block a user