mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
update 优化冗余判断
This commit is contained in:
parent
3f9919fbee
commit
f6af8f151c
@ -7,7 +7,6 @@ import lombok.NoArgsConstructor;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|||||||
@ -128,9 +128,6 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts) {
|
public List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts) {
|
||||||
if (CollUtil.isEmpty(depts)) {
|
|
||||||
return CollUtil.newArrayList();
|
|
||||||
}
|
|
||||||
return TreeBuildUtils.buildMultiRoot(
|
return TreeBuildUtils.buildMultiRoot(
|
||||||
depts,
|
depts,
|
||||||
SysDeptVo::getDeptId,
|
SysDeptVo::getDeptId,
|
||||||
|
|||||||
@ -248,9 +248,6 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<Long>> buildMenuTreeSelect(List<SysMenuVo> menus) {
|
public List<Tree<Long>> buildMenuTreeSelect(List<SysMenuVo> menus) {
|
||||||
if (CollUtil.isEmpty(menus)) {
|
|
||||||
return CollUtil.newArrayList();
|
|
||||||
}
|
|
||||||
return TreeBuildUtils.build(menus, (menu, tree) -> {
|
return TreeBuildUtils.build(menus, (menu, tree) -> {
|
||||||
Tree<Long> menuTree = tree.setId(menu.getMenuId())
|
Tree<Long> menuTree = tree.setId(menu.getMenuId())
|
||||||
.setParentId(menu.getParentId())
|
.setParentId(menu.getParentId())
|
||||||
|
|||||||
@ -92,9 +92,6 @@ public class FlwCategoryServiceImpl implements IFlwCategoryService {
|
|||||||
@Override
|
@Override
|
||||||
public List<Tree<String>> selectCategoryTreeList(FlowCategoryBo category) {
|
public List<Tree<String>> selectCategoryTreeList(FlowCategoryBo category) {
|
||||||
List<FlowCategoryVo> categoryList = this.queryList(category);
|
List<FlowCategoryVo> categoryList = this.queryList(category);
|
||||||
if (CollUtil.isEmpty(categoryList)) {
|
|
||||||
return CollUtil.newArrayList();
|
|
||||||
}
|
|
||||||
return TreeBuildUtils.buildMultiRoot(
|
return TreeBuildUtils.buildMultiRoot(
|
||||||
categoryList,
|
categoryList,
|
||||||
node -> String.valueOf(node.getCategoryId()),
|
node -> String.valueOf(node.getCategoryId()),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user