From 8dc92383d9d2763ec6231e37f49673d74a67b6fc Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 21 十一月 2022 15:22:42 +0800
Subject: [PATCH] update spring-doc 1.6.12 => 1.6.13 update easyexcel 3.1.1 => 3.1.3 update hutool 5.8.8 => 5.8.10 update redisson 3.17.7 => 3.18.0

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 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 32e06d3..00b4024 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
@@ -59,6 +59,18 @@
     }
 
     /**
+     * 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭�
+     *
+     * @param dept 閮ㄩ棬淇℃伅
+     * @return 閮ㄩ棬鏍戜俊鎭泦鍚�
+     */
+    @Override
+    public List<Tree<Long>> selectDeptTreeList(SysDept dept) {
+        List<SysDept> depts = this.selectDeptList(dept);
+        return buildDeptTreeSelect(depts);
+    }
+
+    /**
      * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯
      *
      * @param depts 閮ㄩ棬鍒楄〃
@@ -96,7 +108,11 @@
      */
     @Override
     public SysDept selectDeptById(Long deptId) {
-        return baseMapper.selectById(deptId);
+        SysDept dept = baseMapper.selectById(deptId);
+        SysDept parentDept = baseMapper.selectOne(new LambdaQueryWrapper<SysDept>()
+            .select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId()));
+        dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null);
+        return dept;
     }
 
     /**

--
Gitblit v1.9.3