提交 137cc8d1 编写于 作者: L lishangbu

🍻 Writing code drunkenly.bulid->build

上级 dc54f852
......@@ -37,7 +37,7 @@ public class TreeUtil {
* @param treeNodes 传入的树节点列表
* @return
*/
public <T extends TreeNode> List<T> bulid(List<T> treeNodes, Object root) {
public <T extends TreeNode> List<T> buildByLoop(List<T> treeNodes, Object root) {
List<T> trees = new ArrayList<>();
......@@ -100,7 +100,7 @@ public class TreeUtil {
* @param root
* @return
*/
public List<MenuTree> bulidTree(List<SysMenu> menus, int root) {
public List<MenuTree> buildTree(List<SysMenu> menus, int root) {
List<MenuTree> trees = new ArrayList<>();
MenuTree node;
for (SysMenu menu : menus) {
......@@ -116,6 +116,6 @@ public class TreeUtil {
node.setKeepAlive(menu.getKeepAlive());
trees.add(node);
}
return TreeUtil.bulid(trees, root);
return TreeUtil.buildByLoop(trees, root);
}
}
......@@ -63,7 +63,7 @@ public class MenuController {
.map(MenuTree::new)
.sorted(Comparator.comparingInt(MenuTree::getSort))
.collect(Collectors.toList());
return new R<>(TreeUtil.bulid(menuTreeList, -1));
return new R<>(TreeUtil.buildByLoop(menuTreeList, -1));
}
/**
......@@ -73,7 +73,7 @@ public class MenuController {
*/
@GetMapping(value = "/tree")
public R getTree() {
return new R<>(TreeUtil.bulidTree(sysMenuService.list(Wrappers.emptyWrapper()), -1));
return new R<>(TreeUtil.buildTree(sysMenuService.list(Wrappers.emptyWrapper()), -1));
}
/**
......
......@@ -154,6 +154,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
node.setName(dept.getName());
return node;
}).collect(Collectors.toList());
return TreeUtil.bulid(treeList, 0);
return TreeUtil.buildByLoop(treeList, 0);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册