Browse Source

feat:增加方法

wangchuanjin 1 year ago
parent
commit
706ee090fb
1 changed files with 6 additions and 2 deletions
  1. 6 2
      p/struct.go

+ 6 - 2
p/struct.go

@@ -243,7 +243,9 @@ func NewMyUserInfo(Mgo *MongodbSim, Base_service, Mysql *Mysql, userId string) *
 		logger.Error(userId, "没有找到该用户信息")
 		return nil
 	}
-	return NewUserInfo(*user, 0)
+	ui := NewUserInfo(*user, 0)
+	ui.Id = userId
+	return ui
 }
 
 //
@@ -258,7 +260,9 @@ func NewMyUserInfoByEntUserId(Mgo *MongodbSim, Mysql *Mysql, userId string) *Use
 		logger.Error(userId, "没有找到该用户信息")
 		return nil
 	}
-	return NewUserInfo(*user, 0)
+	ui := NewUserInfo(*user, 0)
+	ui.Id = userId
+	return ui
 }
 
 // 解析用户的推送设置