根据文件列表构建树形结构的父子关系
代码生成结果:
{id=1, parentId=0, children=[{id=4, parentId=1, children=[{id=7, parentId=4, children=[], name=节点7, level =2}, {id=8, parentId=4, children=[], name=节点8, level =2}], name=节点4, level =1}, {id=5, parentId=1, children=[{id=9, parentId=5, children=[], name=节点9, level =2}], name=节点5, level =1}, {id=6, parentId=1, children=[], name=节点6, level =1}], name=节点1, level =0}
{id=2, parentId=0, children=[], name=节点2, level =0}
{id=3, parentId=0, children=[], name=节点3, level =0}
{id=10, parentId=100, children=[], name=节点10, level =0}
2021-12-08 16:36:17
658KB
java
1