|
|
@ -17,6 +17,7 @@ public class TreeSelect implements Serializable { |
|
|
private static final long serialVersionUID = 1L; |
|
|
private static final long serialVersionUID = 1L; |
|
|
private Long id; |
|
|
private Long id; |
|
|
private String label; |
|
|
private String label; |
|
|
|
|
|
private String status; |
|
|
@JsonInclude(Include.NON_EMPTY) |
|
|
@JsonInclude(Include.NON_EMPTY) |
|
|
private List children; |
|
|
private List children; |
|
|
|
|
|
|
|
|
@ -26,12 +27,14 @@ public class TreeSelect implements Serializable { |
|
|
public TreeSelect(SysDept dept) { |
|
|
public TreeSelect(SysDept dept) { |
|
|
this.id = dept.getDeptId(); |
|
|
this.id = dept.getDeptId(); |
|
|
this.label = dept.getDeptName(); |
|
|
this.label = dept.getDeptName(); |
|
|
|
|
|
this.status = dept.getStatus(); |
|
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); |
|
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public TreeSelect(SysMenu menu) { |
|
|
public TreeSelect(SysMenu menu) { |
|
|
this.id = menu.getMenuId(); |
|
|
this.id = menu.getMenuId(); |
|
|
this.label = menu.getMenuName(); |
|
|
this.label = menu.getMenuName(); |
|
|
|
|
|
this.status = menu.getStatus(); |
|
|
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); |
|
|
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|