refactor(framework): 更新注解和流操作以提高代码质量

This commit is contained in:
2026-02-27 16:08:41 +08:00
parent dc3fb8fdfc
commit 1b1bb10089
10 changed files with 124 additions and 126 deletions
@@ -208,7 +208,7 @@ public class SystemDeptService {
}
}
// 编辑部门时不显示自己以及自己下级的数据, 避免出现PID数据环形问题
depts = depts.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toList());
depts = depts.stream().filter(i -> !ids.contains(i.getId())).toList();
}
deptSet1.addAll(depts);
}
@@ -216,7 +216,7 @@ public class SystemDeptService {
// 构建部门树
Set<SystemDeptVo> trees = new LinkedHashSet<>();
Set<SystemDeptVo> deptSet = new LinkedHashSet<>();
List<String> deptNames = deptList.stream().map(SystemDeptTb::getName).collect(Collectors.toList());
List<String> deptNames = deptList.stream().map(SystemDeptTb::getName).toList();
boolean isChild;
List<SystemDeptVo> systemDeptVos = KitBeanUtil.copyToList(deptList, SystemDeptVo.class);