package cn.cerc.mis.core;

import com.google.gson.Gson;

public class MenuData {
    // 页面类名代码，用于css定位
    private String id = "";
    // 页面标题
    private String caption;
    // 页面描述
    private String describe;
    private boolean security;
    private String parent = "";
    // 页面图标名称
    private String image;
    // 授权权限代码
    private String proccode;
    // 适用版本
    private String versions;
    // 页面版面代码，用于排版定位
    private String pageNo = "000";
    private boolean web; // 是否支持Web调用
    private boolean win; // 是否支持Window调用
    private boolean phone; // 是否支持phone调用
    private boolean hide; // 是否隐藏菜单
    private boolean folder; // 是否为目录结构
    private boolean custom; // 是否客制化菜单
    private String funcCode;
    private String module;
    private String group;

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        if (id.indexOf('.') > -1) {
            throw new RuntimeException("error id: " + id);
        }
        this.id = id;
    }

    public String getCaption() {
        return caption;
    }

    public void setCaption(String caption) {
        if (caption != null) {
            String[] captions = caption.split("\\\\");
            this.caption = captions[captions.length - 1];
        } else {
            this.caption = "";
        }
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public boolean isSecurity() {
        return security;
    }

    public void setSecurity(boolean security) {
        this.security = security;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    @Deprecated // 此函数不再需要
    public String getClazz() {
        return "";
    }

    @Deprecated // 此函数不再需要
    public void setClazz(String clazz) {
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getProccode() {
        return proccode;
    }

    public void setProccode(String proccode) {
        this.proccode = proccode;
    }

    @Override
    public String toString() {
        Gson gson = new Gson();
        return gson.toJson(this);
    }

    public String getVersions() {
        return versions;
    }

    public void setVersions(String versions) {
        this.versions = versions;
    }

    @Deprecated // 请改使用 getPageNo
    public String getFormNo() {
        return pageNo;
    }

    @Deprecated // 请改使用 setPageNo
    public void setFormNo(String pageNo) {
        this.pageNo = pageNo;
    }

    public String getPageNo() {
        return pageNo;
    }

    public void setPageNo(String pageNo) {
        this.pageNo = pageNo;
    }

    public boolean isWeb() {
        return web;
    }

    public void setWeb(boolean web) {
        this.web = web;
    }

    public boolean isWin() {
        return win;
    }

    public void setWin(boolean win) {
        this.win = win;
    }

    public boolean getHide() {
        return hide;
    }

    public void setHide(boolean hide) {
        this.hide = hide;
    }

    public boolean getFolder() {
        return folder;
    }

    public void setFolder(boolean folder) {
        this.folder = folder;
    }

    public boolean getCustom() {
        return custom;
    }

    public void setCustom(boolean custom) {
        this.custom = custom;
    }

    public String getFuncCode() {
        return funcCode;
    }

    public void setFuncCode(String funcCode) {
        this.funcCode = funcCode;
    }

    public boolean isPhone() {
        return phone;
    }

    public void setPhone(boolean phone) {
        this.phone = phone;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

}

@@ -48,16 +48,60 @@
 on.Gson;
+%0Aimport lombok.Getter;%0Aimport lombok.Setter;
 %0A%0Apublic
@@ -180,16 +180,47 @@
 // %E9%A1%B5%E9%9D%A2%E6%A0%87%E9%A2%98%0A
+    // TODO: 2020/4/23 %E6%94%B9%E4%B8%BAtitle%0A
     priv
@@ -840,16 +840,71 @@
 group;%0A%0A
+    @Setter%0A    @Getter%0A    private int child;// %E5%AD%90%E9%A1%B9%E6%95%B0%E9%87%8F%0A%0A
     publ

Update MenuData.java