liujie
昨天 c983a0a398504697a777ffae48e59961b5ee2bd7
hugray-server/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TreeSelect.java
@@ -27,6 +27,15 @@
    /** 节点禁用 */
    private boolean disabled = false;
    /**
     * 菜单类型(M目录 C菜单 F按钮),仅菜单树赋值;部门/角色/用户等其它树用不到,故按 NON_NULL 不序列化出去
     *
     * 加这个字段是为了让「角色表单的三级权限网格」能按类型分层,而不是靠树的深度去猜层级
     * (深度猜法在出现顶层菜单、或层级变化时就会错)。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String menuType;
    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelect> children;
@@ -48,6 +57,7 @@
    {
        this.id = menu.getMenuId();
        this.label = menu.getMenuName();
        this.menuType = menu.getMenuType();
        this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
    }
@@ -90,4 +100,14 @@
    {
        this.children = children;
    }
    public String getMenuType()
    {
        return menuType;
    }
    public void setMenuType(String menuType)
    {
        this.menuType = menuType;
    }
}