Commit 248629d5 authored by suhuiguang's avatar suhuiguang

1.拦截器多个sql key被清空问题

2.删除多余bizOrgCode ,原因拼接有拦截器实现
parent f10a0b9e
...@@ -937,9 +937,6 @@ LEFT JOIN ( ...@@ -937,9 +937,6 @@ LEFT JOIN (
AND ( usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT') AND ( usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT')
</otherwise> </otherwise>
</choose> </choose>
<if test="bizOrgCode != null and bizOrgCode != ''">
AND usr.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
order by usr.rec_date order by usr.rec_date
</where> </where>
</select> </select>
......
...@@ -1739,9 +1739,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1739,9 +1739,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override @Override
public List<OrgMenuDto> companyTreeByUserAndType(ReginParams reginParams, String type) { public List<OrgMenuDto> companyTreeByUserAndType(ReginParams reginParams, String type) {
String authKey = PermissionInterceptorContext.getDataAuthRule();
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode(); String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
PermissionInterceptorContext.clean();
if (StringUtils.isNotEmpty(type) && type.equals("COMPANY")){ if (StringUtils.isNotEmpty(type) && type.equals("COMPANY")){
//查询当前登录人所属单位/部门 //查询当前登录人所属单位/部门
OrgUsr orgUsr = orgUsrMapper.selectById(reginParams.getPersonIdentity().getCompanyId()); OrgUsr orgUsr = orgUsrMapper.selectById(reginParams.getPersonIdentity().getCompanyId());
...@@ -1754,6 +1755,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1754,6 +1755,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
} }
} }
PermissionInterceptorContext.setDataAuthRule(authKey);
param.put("bizOrgCode", bizOrgCode); param.put("bizOrgCode", bizOrgCode);
param.put("type", type); param.put("type", type);
List<OrgUsr> list = orgUsrMapper.companyTreeByUserAndType(param); List<OrgUsr> list = orgUsrMapper.companyTreeByUserAndType(param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment