import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* @author :zhangyang
* @version :1.0
* @description:
* @date :Created in 2020/6/10 9:54
* @modified By:
*/
@Data
@Accessors(chain = true)
public class DemoClass {
private String id;
private String name;
private String pid;
private List<DemoClass> children;
}
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import java.util.List;
import java.util.Map;
/**
* @author :zhangyang
* @version :1.0
* @description:递归
* @date :Created in 2020/6/10 11:11
* @modified By:
*/
@AllArgsConstructor
public class DiGui {
/**
* 父节点
*/
private List<DemoClass> root;
/**
* 所有节点(或不包含父节点)
*/
private List<De