From 3b8a68c4cf99abc789fb5b13f9017593298c8fe1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 3 Dec 2022 12:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7oshi=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC6.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../system/service/impl/SysDeptServiceImpl.java | 6 +----- .../system/service/impl/SysMenuServiceImpl.java | 12 ++++-------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index f7280e97..16c88080 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 2.2.2 1.4.5 2.0.16 - 6.3.0 + 6.3.2 2.11.0 1.4 3.2.2 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 1aa456f0..41423884 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 @@ -71,11 +71,7 @@ public class SysDeptServiceImpl implements ISysDeptService public List buildDeptTree(List depts) { List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysDept dept : depts) - { - tempList.add(dept.getDeptId()); - } + List tempList = depts.stream().map(SysDept::getDeptId).collect(Collectors.toList()); for (SysDept dept : depts) { // 如果是顶级节点, 遍历该父节点的所有子节点 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 481a9ec9..a85c3506 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -223,11 +223,7 @@ public class SysMenuServiceImpl implements ISysMenuService public List buildMenuTree(List menus) { List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysMenu dept : menus) - { - tempList.add(dept.getMenuId()); - } + List tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); for (Iterator iterator = menus.iterator(); iterator.hasNext();) { SysMenu menu = (SysMenu) iterator.next(); @@ -479,8 +475,8 @@ public class SysMenuServiceImpl implements ISysMenuService /** * 递归列表 * - * @param list - * @param t + * @param list 分类表 + * @param t 子节点 */ private void recursionFn(List list, SysMenu t) { @@ -525,7 +521,7 @@ public class SysMenuServiceImpl implements ISysMenuService /** * 内链域名特殊字符替换 * - * @return + * @return 替换后的内链域名 */ public String innerLinkReplaceEach(String path) {