| | |
| | | */
|
| | | public static final String DATA_SCOPE_SELF = "5";
|
| | |
|
| | | /**
|
| | | * 数据权限过滤关键字
|
| | | */
|
| | | public static final String DATA_SCOPE = "dataScope";
|
| | |
|
| | | @Autowired
|
| | | private AwaitUserService awaitUserService;
|
| | |
|
| | |
| | | *
|
| | | * @param joinPoint 切点
|
| | | * @param user 用户
|
| | | * @param alias 别名
|
| | | * @param deptAlias 部门别名
|
| | | * @param userAlias 用户别名
|
| | | */
|
| | | public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias)
|
| | | {
|
| | |
| | | if (StringUtils.isNotBlank(sqlString.toString()))
|
| | | {
|
| | | BaseEntity baseEntity = (BaseEntity) joinPoint.getArgs()[0];
|
| | | baseEntity.setDataScope(" AND (" + sqlString.substring(4) + ")");
|
| | | baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
|
| | | }
|
| | | }
|
| | |
|