指针问题
This commit is contained in:
parent
5d0185c458
commit
b27f1ca8f9
@ -27,11 +27,11 @@ func (this *ModelExpand) Init(service core.IService, module core.IModule, comp c
|
|||||||
//获取用户通过扩展表
|
//获取用户通过扩展表
|
||||||
func (this *ModelExpand) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
func (this *ModelExpand) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
||||||
result = &pb.DBUserExpand{}
|
result = &pb.DBUserExpand{}
|
||||||
if this.module.IsCross() {
|
if db.IsCross() {
|
||||||
if model, err := this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err != nil {
|
if model, err := this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err != nil {
|
||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
} else {
|
} else {
|
||||||
if err = model.Get(uid, &result); err != nil && mongo.ErrNoDocuments != err {
|
if err = model.Get(uid, result); err != nil && mongo.ErrNoDocuments != err {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ func (this *ModelExpand) ChangeUserExpand(uid string, value map[string]interface
|
|||||||
var (
|
var (
|
||||||
model *db.DBModel
|
model *db.DBModel
|
||||||
)
|
)
|
||||||
if this.module.IsCross() {
|
if db.IsCross() {
|
||||||
if model, err = this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err == nil {
|
if model, err = this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err == nil {
|
||||||
return model.Change(uid, value)
|
return model.Change(uid, value)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user