Browse Source

feat: 部门树和菜单树新增status字段,表示启用/禁用

feature/agg
yinhuaiwei 2 weeks ago
parent
commit
666f11175b
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      inspect-management/src/main/java/com/inspect/system/domain/vo/TreeSelect.java

+ 3
- 0
inspect-management/src/main/java/com/inspect/system/domain/vo/TreeSelect.java View File

@ -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());
} }


Loading…
Cancel
Save