Commit 9ad6f86e authored by chenzhao's avatar chenzhao

权限修改 开发人员增加区域公司隔离

parent 8c9dc748
......@@ -169,7 +169,7 @@ public class UserEmpowerInterceptor implements Interceptor {
Boolean specific= userEmpower.specific();
//获取参数值,
StdUserEmpower dataAuthRule =(StdUserEmpower) redisUtils.get("Emp_"+RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
String[] data = new String[]{String.join(",",dataAuthRule.getAmosOrgCode()),dataAuthRule.getAdminRegionalCompaniesCode(),dataAuthRule.getUserId(),dataAuthRule.getRegionalCompaniesCode()};
String[] data = new String[]{String.join(",",dataAuthRule.getAmosOrgCode()),dataAuthRule.getAdminRegionalCompaniesCode() == null? dataAuthRule.getRegionalCompaniesCode():dataAuthRule.getAdminRegionalCompaniesCode(),dataAuthRule.getUserId(),dataAuthRule.getRegionalCompaniesCode()};
List<String> list = new ArrayList<>(Arrays.asList(data));
list.removeAll(Collections.singleton(null));
......@@ -179,7 +179,7 @@ public class UserEmpowerInterceptor implements Interceptor {
if (!ValidationUtil.isEmpty(dataAuthRule.getAdminRegionalCompaniesCode()) && fileds.size() >1) {
sq = selectSqlJXS(new String[]{fileds.get(0), fileds.get(1)}, fileCondition, list);
} else if (!ValidationUtil.isEmpty(dataAuthRule.getUserId())) {
sq = selectSqlJXS(new String[]{fileds.get(0),fileds.size()<3?fileds.get(0):fileds.get(2)},new String[]{fileCondition[0],fileCondition[2]} , list);
sq = selectSqlJXS(new String[]{fileds.get(0),fileds.get(1),fileds.size()<3?fileds.get(0):fileds.get(2)},new String[]{fileCondition[0],fileCondition[1],fileCondition[2]} , list);
} else {
sq = selectSqlJXS(new String[]{fileds.get(0)}, fileCondition, specific?list:Arrays.asList(list.get(1)));
}
......
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