|
@@ -17,13 +17,18 @@ const (
|
|
|
|
|
|
// JySession 剑鱼程序SESSION获取
|
|
|
type JySession struct {
|
|
|
- UserId string // 上下文用户信息
|
|
|
- NewUid int64 // 新用户id
|
|
|
- EntId int64 // 当前企业id
|
|
|
- EntName string // 当前企业名称
|
|
|
- Phone string // 手机号
|
|
|
- Data g.Map // 当前Session管理对象
|
|
|
- EntUserId int64 //当前企业用户id
|
|
|
+ UserId string // 上下文用户信息
|
|
|
+ NewUid int64 // 新用户id
|
|
|
+ EntId int64 // 当前企业id
|
|
|
+ EntName string // 当前企业名称
|
|
|
+ Phone string // 手机号
|
|
|
+ Data g.Map // 当前Session管理对象
|
|
|
+ EntUserId int64 //当前企业用户id
|
|
|
+ UserName string //用户名称
|
|
|
+ UserPositionId int64 //个人职位id
|
|
|
+ UserAccountId int64 //个人账户id
|
|
|
+ EntPositionId int64 //企业职位id
|
|
|
+ EntAccountId int64 //企业账户id
|
|
|
}
|
|
|
|
|
|
// InitJySessionContext 获取用户session
|
|
@@ -50,6 +55,11 @@ func InitJySessionContext(r *ghttp.Request) (jSession *JySession, err error) {
|
|
|
jSession.EntId = gconv.Int64(data["entId"])
|
|
|
jSession.NewUid = gconv.Int64(data["base_user_id"])
|
|
|
jSession.EntUserId = gconv.Int64(data["entUserId"])
|
|
|
+ jSession.UserName, _ = data["userName"].(string)
|
|
|
+ jSession.UserPositionId = gconv.Int64(data["userPositionId"])
|
|
|
+ jSession.UserAccountId = gconv.Int64(data["userAccountId"])
|
|
|
+ jSession.EntPositionId = gconv.Int64(data["entPositionId"])
|
|
|
+ jSession.EntAccountId = gconv.Int64(data["entAccountId"])
|
|
|
jSession.Data = data
|
|
|
return
|
|
|
}
|