Browse Source

feat:增加部门id

wangchuanjin 1 năm trước cách đây
mục cha
commit
acdcd8fdbf
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 1 1
      core/proxy/broker/outServer/SussBi.go
  2. 2 0
      core/router/session.go

+ 1 - 1
core/proxy/broker/outServer/SussBi.go

@@ -175,7 +175,7 @@ func (s *sussBi) Filter(r *ghttp.Request) error {
 	ctx := router.GetGContext(r.GetCtx())
 	http.SetCookie(r.Response.ResponseWriter, &http.Cookie{
 		Name:  "BITOKEN",
-		Value: common.GetMd5String(fmt.Sprintf("%s_%s_%d_%d_%d_%d_%d_%d_%s_%s_%d", ctx.Sess.NickName, ctx.Sess.YyName, ctx.Sess.EntRole, ctx.Sess.EntNicheDis, ctx.Sess.PositionId, ctx.Sess.AccountId, ctx.Sess.EntAccountId, ctx.Sess.EntId, ctx.Sess.EntName, ctx.Sess.EntUserName, ctx.Sess.EntUserId)),
+		Value: common.GetMd5String(fmt.Sprintf("%s_%s_%d_%d_%d_%d_%d_%d_%s_%d_%s_%d", ctx.Sess.NickName, ctx.Sess.YyName, ctx.Sess.EntRole, ctx.Sess.EntNicheDis, ctx.Sess.PositionId, ctx.Sess.AccountId, ctx.Sess.EntAccountId, ctx.Sess.EntId, ctx.Sess.EntName, ctx.Sess.EntDeptId, ctx.Sess.EntUserName, ctx.Sess.EntUserId)),
 	})
 	if ctx.Sess.NewUid != 0 {
 		replaceMap := map[string]interface{}{

+ 2 - 0
core/router/session.go

@@ -40,6 +40,7 @@ type JySession struct {
 	MgoUserId    string //mongodb用户id
 	EntRole      int64  //管理员角色
 	EntNicheDis  int64  //商机分配角色
+	EntDeptId    int64  //部门id
 }
 
 // InitJySessionContext 获取用户session
@@ -83,6 +84,7 @@ func InitJySessionContext(r *ghttp.Request) (jSession *JySession, err error) {
 	jSession.MgoUserId = gconv.String(data["mgoUserId"])
 	jSession.EntRole = gconv.Int64(data["entRole"])
 	jSession.EntNicheDis = gconv.Int64(data["entNicheDis"])
+	jSession.EntDeptId = gconv.Int64(data["entDeptId"])
 
 	jSession.Data = data
 	return