@Setter
@Getter
public class TreeNode<T> {
@ApiModelProperty(value = "id", notes = "id")
public Long id;
@ApiModelProperty(value = "父ID", notes = "父ID")
private Long parentId;
@ApiModelProperty(value = "子节点", notes = "子节点")
private List<T> children = new ArrayList<>();
}
部门:
@Entity
@Table(name = "department")
@Getter
@Setter
public class Department {
public static final int STATUS_DISABLED = 0;
public static final int STATUS_ENABLED = 1;
@Column(nullable = false, columnDefinition="bigint COMMENT '唯一标识'")
@Id
private Long id;
@Column(nullable = false, columnDefiniti