From f11db02ff84efaf69a881a5ffc9f42d1c19a11a8 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 08 十二月 2022 10:19:38 +0800
Subject: [PATCH] 修复代码生成图片/文件/单选时选择必填无法校验问题(I64IO2)

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java |    6 +-----
 1 files changed, 1 insertions(+), 5 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 1aa456f..4142388 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 List<SysDept> buildDeptTree(List<SysDept> depts)
     {
         List<SysDept> returnList = new ArrayList<SysDept>();
-        List<Long> tempList = new ArrayList<Long>();
-        for (SysDept dept : depts)
-        {
-            tempList.add(dept.getDeptId());
-        }
+        List<Long> tempList = depts.stream().map(SysDept::getDeptId).collect(Collectors.toList());
         for (SysDept dept : depts)
         {
             // 如果是顶级节点, 遍历该父节点的所有子节点

--
Gitblit v1.9.2