指针问题
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) {
|
||||
result = &pb.DBUserExpand{}
|
||||
if this.module.IsCross() {
|
||||
if db.IsCross() {
|
||||
if model, err := this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err != nil {
|
||||
this.module.Errorln(err)
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
@ -52,7 +52,7 @@ func (this *ModelExpand) ChangeUserExpand(uid string, value map[string]interface
|
||||
var (
|
||||
model *db.DBModel
|
||||
)
|
||||
if this.module.IsCross() {
|
||||
if db.IsCross() {
|
||||
if model, err = this.module.GetDBNoduleByUid(uid, this.TableName, this.Expired); err == nil {
|
||||
return model.Change(uid, value)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user