Skip to content

david1025/tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treeUtils

将List类型的数据构造成父子结构,children的结构。

使用方法

将对应TreeNodeId,TreeNodeName,TreeNodeParentId,TreeNodeOrder,TreeNodeLevel对应到我们的对象中

public class CustomerObject1 {

    @TreeNodeId
    private String id;

    @TreeNodeName
    private String name;

    @TreeNodeParentId
    private String parentId;

    @TreeNodeOrder
    private Integer orderNum;

    @TreeNodeLevel
    private Integer level;

    private String test1;

    private String test2;
}

然后

Tree tree = new Tree(List对象);
// 获取完整树型
List<TreeNode> treeNode1 = tree.getRoot();

Releases

No releases published

Packages

No packages published

Languages