From 6c01241b96f66239aff192f22dce99e1275986ed Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期二, 15 二月 2022 11:07:50 +0800 Subject: [PATCH] fix 回滚代码生成部分优化 修复优化导致的问题 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 3 +-- 1 files changed, 1 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 0dd441b..621dc07 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 @@ -60,8 +60,7 @@ if (CollUtil.isEmpty(depts)) { return CollUtil.newArrayList(); } - Long parentId = depts.get(0).getParentId(); - return TreeBuildUtils.build(depts, parentId, (dept, tree) -> + return TreeBuildUtils.build(depts, (dept, tree) -> tree.setId(dept.getDeptId()) .setParentId(dept.getParentId()) .setName(dept.getDeptName()) -- Gitblit v1.9.3