From f41bfdb8eba36ab3d38c11fff2328e6c11888d4b Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 03 三月 2022 01:55:01 +0800 Subject: [PATCH] update 更新数据权限Service的使用说明 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 0dd441b..5cd3fe0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -60,8 +60,7 @@ if (CollUtil.isEmpty(depts)) { return CollUtil.newArrayList(); } - Long parentId = depts.get(0).getParentId(); - return TreeBuildUtils.build(depts, parentId, (dept, tree) -> + return TreeBuildUtils.build(depts, (dept, tree) -> tree.setId(dept.getDeptId()) .setParentId(dept.getParentId()) .setName(dept.getDeptName()) @@ -153,7 +152,7 @@ */ @Override public void checkDeptDataScope(Long deptId) { - if (!SysUser.isAdmin(LoginHelper.getUserId())) { + if (!LoginHelper.isAdmin()) { SysDept dept = new SysDept(); dept.setDeptId(deptId); List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); -- Gitblit v1.9.3