Bladeren bron

部门及以下数据权限(调整为以下及所有子节点)

RuoYi 5 jaren geleden
bovenliggende
commit
f96aeca790

File diff suppressed because it is too large
+ 0 - 0
ruoyi-admin/src/main/resources/static/js/plugins/slimscroll/jquery.slimscroll.min.js


+ 3 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java

@@ -112,9 +112,10 @@ public class DataScopeAspect
             }
             else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
             {
+                String deptChild = user.getDept().getParentId() + "," + user.getDeptId();
                 sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or parent_id= {} )", alias,
-                        user.getDeptId(), user.getDeptId()));
+                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or ancestors LIKE '%{}%' )",
+                        alias, user.getDeptId(), deptChild));
             }
         }
 

Some files were not shown because too many files changed in this diff