|
@@ -74,7 +74,7 @@ public class DataScopeAspect
|
|
|
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
|
|
{
|
|
|
String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext());
|
|
|
- dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias(), permission);
|
|
|
+ dataScopeFilter(joinPoint, currentUser, null, controllerDataScope.userAlias(), permission);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -122,11 +122,11 @@ public class DataScopeAspect
|
|
|
if (scopeCustomIds.size() > 1)
|
|
|
{
|
|
|
// 多个自定数据权限使用in查询,避免多次拼接。
|
|
|
- sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
|
|
+// sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
|
|
+// sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
|
|
}
|
|
|
}
|
|
|
else if (DATA_SCOPE_SELF.equals(dataScope))
|
|
@@ -138,7 +138,7 @@ public class DataScopeAspect
|
|
|
else
|
|
|
{
|
|
|
// 数据权限为仅本人且没有userAlias别名不查询任何数据
|
|
|
- sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
|
|
+// sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
|
|
}
|
|
|
}
|
|
|
conditions.add(dataScope);
|
|
@@ -147,7 +147,7 @@ public class DataScopeAspect
|
|
|
// 角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据
|
|
|
if (StringUtils.isEmpty(conditions))
|
|
|
{
|
|
|
- sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
|
|
+// sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(sqlString.toString()))
|