|
@@ -13,6 +13,7 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
"app.yhyue.com/moapp/jypkg/middleground"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
|
|
|
+ userCenterBp "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
)
|
|
|
|
|
|
// 大会员状态redis缓存
|
|
@@ -268,34 +269,22 @@ func (this *BigVipBaseMsg) GetUseId() string {
|
|
|
return this.Uid
|
|
|
}
|
|
|
|
|
|
-type UserInfo struct {
|
|
|
- S_openid string //微信openid
|
|
|
- A_openid string //app 微信openid
|
|
|
- Phone string //手机号
|
|
|
- Nickname string //昵称
|
|
|
- Headimg string //头像
|
|
|
- Company string //公司
|
|
|
- Position string //职位
|
|
|
- Password string //密码
|
|
|
- Unionid string //unionid
|
|
|
- Base_user_id int64 //用户中台base_user的主键id,
|
|
|
-}
|
|
|
-
|
|
|
//根据userid获取用户基本信息
|
|
|
-func GetInfoForBaseUser(mgo m.MongodbSim, userid string) *UserInfo {
|
|
|
+func GetInfoForBaseUser(mgo m.MongodbSim, userid string) *userCenterBp.UserIdReq {
|
|
|
if userid == "" {
|
|
|
return nil
|
|
|
}
|
|
|
data, ok := mgo.FindById("user", userid, `{"base_user_id":1,"s_m_openid":1,"a_m_openid":1,"s_m_phone":1,"s_phone":1,"s_nickname":1,"s_jyname":1,"s_headimageurl":1,"s_headimage":1,"s_company":1,"s_password":1,"s_unionid":1}`)
|
|
|
if ok && data != nil && len(*data) > 0 {
|
|
|
- userinfo := &UserInfo{
|
|
|
- Base_user_id: qutil.Int64All((*data)["base_user_id"]),
|
|
|
+ userinfo := &userCenterBp.UserIdReq{
|
|
|
+ Appid: "10000",
|
|
|
+ Id: qutil.Int64All((*data)["base_user_id"]),
|
|
|
}
|
|
|
if s_openid := qutil.ObjToString((*data)["s_m_openid"]); s_openid != "" {
|
|
|
- userinfo.S_openid = s_openid
|
|
|
+ userinfo.SOpenid = s_openid
|
|
|
}
|
|
|
if a_openid := qutil.ObjToString((*data)["a_m_openid"]); a_openid != "" {
|
|
|
- userinfo.A_openid = a_openid
|
|
|
+ userinfo.AOpenid = a_openid
|
|
|
}
|
|
|
phone := qutil.ObjToString((*data)["s_phone"])
|
|
|
if phone == "" {
|