|
@@ -1,7 +1,6 @@
|
|
package front
|
|
package front
|
|
|
|
|
|
import (
|
|
import (
|
|
- "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
|
"fmt"
|
|
"fmt"
|
|
"jy/src/jfw/config"
|
|
"jy/src/jfw/config"
|
|
"jy/src/jfw/jyutil"
|
|
"jy/src/jfw/jyutil"
|
|
@@ -17,6 +16,8 @@ import (
|
|
"sync"
|
|
"sync"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
+ "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
|
+
|
|
util "app.yhyue.com/moapp/jybase/common"
|
|
util "app.yhyue.com/moapp/jybase/common"
|
|
. "app.yhyue.com/moapp/jybase/date"
|
|
. "app.yhyue.com/moapp/jybase/date"
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
@@ -870,39 +871,23 @@ func (m *Front) Sess(ostr string) error {
|
|
userFlag := str[0]
|
|
userFlag := str[0]
|
|
ok := false
|
|
ok := false
|
|
var identity *pb.Identity
|
|
var identity *pb.Identity
|
|
-
|
|
|
|
if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
|
|
if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
|
|
-
|
|
|
|
if str[1] == "userId" {
|
|
if str[1] == "userId" {
|
|
-
|
|
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
|
|
-
|
|
|
|
} else if str[1] == "entUserId" {
|
|
} else if str[1] == "entUserId" {
|
|
-
|
|
|
|
identity = config.Middleground.UserCenter.IdentityByEntUserId(util.Int64All(userFlag))
|
|
identity = config.Middleground.UserCenter.IdentityByEntUserId(util.Int64All(userFlag))
|
|
-
|
|
|
|
} else if str[1] == "positionId" {
|
|
} else if str[1] == "positionId" {
|
|
-
|
|
|
|
identity = config.Middleground.UserCenter.IdentityByPositionId(util.Int64All(userFlag))
|
|
identity = config.Middleground.UserCenter.IdentityByPositionId(util.Int64All(userFlag))
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
if identity != nil {
|
|
if identity != nil {
|
|
-
|
|
|
|
ok, _, _ = FindUserAndCreateSessByBaseUserId(identity.UserId, m.Session(), false)
|
|
ok, _, _ = FindUserAndCreateSessByBaseUserId(identity.UserId, m.Session(), false)
|
|
-
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if str[1] == "_id" {
|
|
if str[1] == "_id" {
|
|
-
|
|
|
|
ok, _, _ = FindUserAndCreateSessById(mgdb.StringTOBsonId(userFlag), m.Session(), false)
|
|
ok, _, _ = FindUserAndCreateSessById(mgdb.StringTOBsonId(userFlag), m.Session(), false)
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false)
|
|
ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false)
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
|
|
}
|
|
}
|
|
ok = ok && NewIdentityInfo(identity).Switch(m.Session())
|
|
ok = ok && NewIdentityInfo(identity).Switch(m.Session())
|
|
@@ -916,14 +901,15 @@ func (m *Front) Sess(ostr string) error {
|
|
if len(strs) > 2 {
|
|
if len(strs) > 2 {
|
|
var entUserId int64
|
|
var entUserId int64
|
|
if strings.HasPrefix(strs[2], "V20221215-") {
|
|
if strings.HasPrefix(strs[2], "V20221215-") {
|
|
|
|
+ entParams := strings.Split(sewx.Decode4HexByCheck(strings.TrimPrefix(strs[2], "V20221215-")), "_")
|
|
|
|
+ entUserId = util.Int64All(entParams[1])
|
|
|
|
+ } else {
|
|
entParams := strings.Split(sewx.DecodeString(strs[2]), "_")
|
|
entParams := strings.Split(sewx.DecodeString(strs[2]), "_")
|
|
entUserId = util.Int64All(entParams[1])
|
|
entUserId = util.Int64All(entParams[1])
|
|
-
|
|
|
|
}
|
|
}
|
|
if identity := config.Middleground.UserCenter.IdentityByEntUserId(entUserId); identity != nil {
|
|
if identity := config.Middleground.UserCenter.IdentityByEntUserId(entUserId); identity != nil {
|
|
NewIdentityInfo(identity).Switch(m.Session())
|
|
NewIdentityInfo(identity).Switch(m.Session())
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
actionurl = util.ObjToString(urlMap[str[3]])
|
|
actionurl = util.ObjToString(urlMap[str[3]])
|