From 42df37bb21c42e00aac5be6478cf3bec5d0ca54a Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 01 三月 2022 10:08:09 +0800
Subject: [PATCH] 发布 4.0.1 大升级 4.X 之后第一个修复版本

---
 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