官方代码同步

master
Sxile 4 years ago committed by Limy
parent 2bbf4ad36d
commit 11ec7a669a

@ -17,7 +17,7 @@ import com.ruoyi.system.domain.SysUser;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Aspect @Aspect
@ -89,7 +89,7 @@ public class DataScopeAspect
/** /**
* *
* *
* @param joinPoint * @param joinPoint
* @param user * @param user
* @param deptAlias * @param deptAlias
@ -120,7 +120,7 @@ public class DataScopeAspect
else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
{ {
sqlString.append(StringUtils.format( 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())); deptAlias, user.getDeptId(), user.getDeptId()));
} }
else if (DATA_SCOPE_SELF.equals(dataScope)) else if (DATA_SCOPE_SELF.equals(dataScope))

Loading…
Cancel
Save