|
@@ -246,6 +246,21 @@ func NewMyUserInfo(Mgo *MongodbSim, Base_service, Mysql *Mysql, userId string) *
|
|
return NewUserInfo(*user, 0)
|
|
return NewUserInfo(*user, 0)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//
|
|
|
|
+func NewMyUserInfoByEntUserId(Mgo *MongodbSim, Base_service, Mysql *Mysql, userId string) *UserInfo {
|
|
|
|
+ var user *map[string]interface{}
|
|
|
|
+ if IsObjectIdHex(userId) {
|
|
|
|
+ user, _ = Mgo.FindById(Mgo_User, userId, UserCollFields)
|
|
|
|
+ } else {
|
|
|
|
+ user = GetAllByEntUserId(Mgo, Mysql, util.IntAll(userId))
|
|
|
|
+ }
|
|
|
|
+ if user == nil || len(*user) == 0 {
|
|
|
|
+ logger.Error(userId, "没有找到该用户信息")
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ return NewUserInfo(*user, 0)
|
|
|
|
+}
|
|
|
|
+
|
|
// 解析用户的推送设置
|
|
// 解析用户的推送设置
|
|
func (u *UserInfo) GetPushSet(obj map[string]interface{}) {
|
|
func (u *UserInfo) GetPushSet(obj map[string]interface{}) {
|
|
subSet, _ := obj["o_subset"].(map[string]interface{})
|
|
subSet, _ := obj["o_subset"].(map[string]interface{})
|