From 409849db1a41f559edc582c6fbc0b8d0e7e55a6a Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 19 十二月 2022 14:38:08 +0800
Subject: [PATCH] update springdoc 1.6.13 => 1.6.14 update snakeyaml 1.32 => 1.33 update springboot-admin 2.7.7 => 2.7.9
---
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