|
|
|
@ -17,7 +17,7 @@ import com.ruoyi.system.domain.SysUser;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 数据过滤处理
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
*/
|
|
|
|
|
@Aspect
|
|
|
|
@ -89,7 +89,7 @@ public class DataScopeAspect
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 数据范围过滤
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param joinPoint 切点
|
|
|
|
|
* @param user 用户
|
|
|
|
|
* @param deptAlias 部门别名
|
|
|
|
@ -120,7 +120,7 @@ public class DataScopeAspect
|
|
|
|
|
else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
|
|
|
|
|
{
|
|
|
|
|
sqlString.append(StringUtils.format(
|
|
|
|
|
" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
|
|
|
|
|
" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or CHARINDEX(cast( {} as nvarchar),ancestors)>0 )",
|
|
|
|
|
deptAlias, user.getDeptId(), user.getDeptId()));
|
|
|
|
|
}
|
|
|
|
|
else if (DATA_SCOPE_SELF.equals(dataScope))
|
|
|
|
|