|
@@ -20,6 +20,18 @@ func (l *InfoService) Myinfo(sid string) map[string]string {
|
|
if info_i != nil {
|
|
if info_i != nil {
|
|
info_m, _ := info_i.(map[string]interface{})
|
|
info_m, _ := info_i.(map[string]interface{})
|
|
entNicheDis := common.Int64All(info_m["entNicheDis"])
|
|
entNicheDis := common.Int64All(info_m["entNicheDis"])
|
|
|
|
+ depIDArr := ""
|
|
|
|
+ if entNicheDis > 0 {
|
|
|
|
+ //查询所有部门标识
|
|
|
|
+ entId := gconv.String(info_m["entId"])
|
|
|
|
+ entDeptId := gconv.String(info_m["entDeptId"])
|
|
|
|
+ deptArr := entity.JyMysql.SelectBySql("select GROUP_CONCAT(DISTINCT b.id) as depIDArr from entniche_department_parent a"+
|
|
|
|
+ " INNER JOIN entniche_department b "+
|
|
|
|
+ "on (b.ent_id=? and (b.id=? or (a.pid=? and a.id=b.id)))", entId, entDeptId, entDeptId)
|
|
|
|
+ if len(*deptArr) > 0 {
|
|
|
|
+ depIDArr = common.InterfaceToStr((*deptArr)[0]["depIDArr"])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
infoMap = map[string]string{
|
|
infoMap = map[string]string{
|
|
"nickName": RsaEncrypt([]byte(gconv.String(info_m["s_nickname"]))),
|
|
"nickName": RsaEncrypt([]byte(gconv.String(info_m["s_nickname"]))),
|
|
"entRole": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entRole"])))),
|
|
"entRole": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entRole"])))),
|
|
@@ -33,6 +45,7 @@ func (l *InfoService) Myinfo(sid string) map[string]string {
|
|
"entUserId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entUserId"])))),
|
|
"entUserId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entUserId"])))),
|
|
"userId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["base_user_id"])))),
|
|
"userId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["base_user_id"])))),
|
|
"entDeptId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entDeptId"])))),
|
|
"entDeptId": RsaEncrypt([]byte(gconv.String(common.Int64All(info_m["entDeptId"])))),
|
|
|
|
+ "entChildDept": RsaEncrypt([]byte(depIDArr)),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return infoMap
|
|
return infoMap
|