From acbdd6365a174a38e33c968a10612352c34eaa54 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期一, 19 九月 2022 14:41:36 +0800
Subject: [PATCH] !581 优化日志操作中重置按钮时重复查询的问题 Merge pull request !581 from 也曾为你、像超人/N/A
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 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 70e794a..1aa456f 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
@@ -49,6 +49,19 @@
}
/**
+ * 查询部门树结构信息
+ *
+ * @param dept 部门信息
+ * @return 部门树信息集合
+ */
+ @Override
+ public List<TreeSelect> selectDeptTreeList(SysDept dept)
+ {
+ List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
+ return buildDeptTreeSelect(depts);
+ }
+
+ /**
* 构建前端所需要树结构
*
* @param depts 部门列表
@@ -63,9 +76,11 @@
{
tempList.add(dept.getDeptId());
}
- for (SysDept dept : depts) {
+ for (SysDept dept : depts)
+ {
// 如果是顶级节点, 遍历该父节点的所有子节点
- if (!tempList.contains(dept.getParentId())) {
+ if (!tempList.contains(dept.getParentId()))
+ {
recursionFn(depts, dept);
returnList.add(dept);
}
--
Gitblit v1.9.2