|
@@ -2,7 +2,6 @@ package jy
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
- "net/http"
|
|
|
"strings"
|
|
|
|
|
|
qutil "app.yhyue.com/moapp/jybase/common"
|
|
@@ -10,7 +9,6 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
|
. "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jybase/mysql"
|
|
|
- usercenter "app.yhyue.com/moapp/jybase/usercenter"
|
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
|
)
|
|
|
|
|
@@ -108,6 +106,7 @@ func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId str
|
|
|
}
|
|
|
ClearBigVipUserPower(userId) //大会员状态刷新
|
|
|
sessionVal["userId"] = userId
|
|
|
+ sessionVal["mgoUserId"] = userId
|
|
|
nickName, _ := (*userData)["s_nickname"].(string)
|
|
|
phone, _ := (*userData)["s_phone"].(string)
|
|
|
if nickName == "" {
|
|
@@ -136,33 +135,6 @@ func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId str
|
|
|
sessionVal["s_appponetype"], _ = (*userData)["s_appponetype"].(string)
|
|
|
sessionVal["s_appversion"], _ = (*userData)["s_appversion"].(string)
|
|
|
sessionVal["app_name"] = nickName
|
|
|
- if base_userid := qutil.IntAllDef((*userData)["base_user_id"], 0); base_userid != 0 {
|
|
|
- sessionVal["base_user_id"] = base_userid
|
|
|
-
|
|
|
- identity := usercenter.GetUserIdentity(this.userCenterApi, userId, int64(base_userid), 0, &http.Cookie{})
|
|
|
- if identity != nil {
|
|
|
- if identity.PersonId > 0 {
|
|
|
- sessionVal["personId"] = identity.PersonId
|
|
|
- }
|
|
|
- if identity.UserName != "" {
|
|
|
- sessionVal["userName"] = identity.UserName
|
|
|
- }
|
|
|
- if identity.UserAccountId > 0 {
|
|
|
- sessionVal["userAccountId"] = identity.UserAccountId
|
|
|
- }
|
|
|
- if identity.EntAccountId > 0 {
|
|
|
- sessionVal["entAccountId"] = identity.EntAccountId
|
|
|
- }
|
|
|
- if identity.EntUserAccountId > 0 {
|
|
|
- sessionVal["entUserAccountId"] = identity.EntUserAccountId
|
|
|
- }
|
|
|
- if identity.UserPositionId > 0 {
|
|
|
- sessionVal["userPositionId"] = identity.UserPositionId
|
|
|
- }
|
|
|
- if identity.EntUserPositionId > 0 {
|
|
|
- sessionVal["entUserPositionId"] = identity.EntUserPositionId
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ sessionVal["base_user_id"] = qutil.IntAll((*userData)["base_user_id"])
|
|
|
this.sess.SetMultiple(sessionVal)
|
|
|
}
|