use of io.github.tesla.ops.system.domain.Tree in project tesla by linking12.
the class MenuServiceImpl method getTree.
@Override
public Tree<MenuDO> getTree() {
List<Tree<MenuDO>> trees = new ArrayList<Tree<MenuDO>>();
List<MenuDO> menuDOs = menuMapper.list(new HashMap<>(16));
for (MenuDO sysMenuDO : menuDOs) {
Tree<MenuDO> tree = new Tree<MenuDO>();
tree.setId(sysMenuDO.getMenuId().toString());
tree.setParentId(sysMenuDO.getParentId().toString());
tree.setText(sysMenuDO.getName());
trees.add(tree);
}
Tree<MenuDO> t = BuildTree.build(trees);
return t;
}
Aggregations