|
@@ -1,14 +1,12 @@
|
|
|
package com.usky.system.domain;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
+import com.usky.common.core.bean.BaseEntity;
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
-import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
-import lombok.Data;
|
|
|
-import lombok.EqualsAndHashCode;
|
|
|
-import lombok.experimental.Accessors;
|
|
|
+import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
+import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
-import java.time.LocalDateTime;
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
+import javax.validation.constraints.Size;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -20,18 +18,14 @@ import java.util.List;
|
|
|
* @author JCB
|
|
|
* @since 2022-08-11
|
|
|
*/
|
|
|
-@Data
|
|
|
-@EqualsAndHashCode(callSuper = false)
|
|
|
-@Accessors(chain = true)
|
|
|
-public class SysMobileMenu implements Serializable {
|
|
|
+public class SysMobileMenu extends BaseEntity {
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
/**
|
|
|
* 菜单ID
|
|
|
*/
|
|
|
- @TableId(value = "menu_id", type = IdType.AUTO)
|
|
|
- private Integer menuId;
|
|
|
+ private long menuId;
|
|
|
|
|
|
/**
|
|
|
* 菜单名称
|
|
@@ -50,7 +44,7 @@ public class SysMobileMenu implements Serializable {
|
|
|
/**
|
|
|
* 显示顺序
|
|
|
*/
|
|
|
- private Integer orderNum;
|
|
|
+ private String orderNum;
|
|
|
|
|
|
/**
|
|
|
* 路由地址
|
|
@@ -70,12 +64,12 @@ public class SysMobileMenu implements Serializable {
|
|
|
/**
|
|
|
* 是否为外链(0是 1否)
|
|
|
*/
|
|
|
- private Integer isFrame;
|
|
|
+ private String isFrame;
|
|
|
|
|
|
/**
|
|
|
* 是否缓存(0缓存 1不缓存)
|
|
|
*/
|
|
|
- private Integer isCache;
|
|
|
+ private String isCache;
|
|
|
|
|
|
/**
|
|
|
* 菜单类型(M目录 C菜单 F按钮)
|
|
@@ -83,7 +77,7 @@ public class SysMobileMenu implements Serializable {
|
|
|
private String menuType;
|
|
|
|
|
|
/**
|
|
|
- * 菜单状态(0显示 1隐藏)
|
|
|
+ * 显示状态(0显示 1隐藏)
|
|
|
*/
|
|
|
private String visible;
|
|
|
|
|
@@ -103,35 +97,189 @@ public class SysMobileMenu implements Serializable {
|
|
|
private String icon;
|
|
|
|
|
|
/**
|
|
|
- * 创建者
|
|
|
+ * 子菜单
|
|
|
*/
|
|
|
- private String createBy;
|
|
|
+ @TableField(exist = false)
|
|
|
+ private List<SysMobileMenu> children = new ArrayList<SysMobileMenu>();
|
|
|
|
|
|
- /**
|
|
|
- * 创建时间
|
|
|
- */
|
|
|
- private LocalDateTime createTime;
|
|
|
+ public long getMenuId()
|
|
|
+ {
|
|
|
+ return menuId;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 更新者
|
|
|
- */
|
|
|
- private String updateBy;
|
|
|
+ public void setMenuId(long menuId)
|
|
|
+ {
|
|
|
+ this.menuId = menuId;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 更新时间
|
|
|
- */
|
|
|
- private LocalDateTime updateTime;
|
|
|
+ @NotBlank(message = "菜单名称不能为空")
|
|
|
+ @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
|
|
|
+ public String getMenuName()
|
|
|
+ {
|
|
|
+ return menuName;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 备注
|
|
|
- */
|
|
|
- private String remark;
|
|
|
+ public void setMenuName(String menuName)
|
|
|
+ {
|
|
|
+ this.menuName = menuName;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 子菜单
|
|
|
- */
|
|
|
- @TableField(exist = false)
|
|
|
- private List<SysMobileMenu> children = new ArrayList<SysMobileMenu>();
|
|
|
+ public String getParentName()
|
|
|
+ {
|
|
|
+ return parentName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setParentName(String parentName)
|
|
|
+ {
|
|
|
+ this.parentName = parentName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getParentId()
|
|
|
+ {
|
|
|
+ return parentId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setParentId(Long parentId)
|
|
|
+ {
|
|
|
+ this.parentId = parentId;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message = "显示顺序不能为空")
|
|
|
+ public String getOrderNum()
|
|
|
+ {
|
|
|
+ return orderNum;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrderNum(String orderNum)
|
|
|
+ {
|
|
|
+ this.orderNum = orderNum;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
|
|
|
+ public String getPath()
|
|
|
+ {
|
|
|
+ return path;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPath(String path)
|
|
|
+ {
|
|
|
+ this.path = path;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
|
|
|
+ public String getComponent()
|
|
|
+ {
|
|
|
+ return component;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setComponent(String component)
|
|
|
+ {
|
|
|
+ this.component = component;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getIsFrame()
|
|
|
+ {
|
|
|
+ return isFrame;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setIsFrame(String isFrame)
|
|
|
+ {
|
|
|
+ this.isFrame = isFrame;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getIsCache()
|
|
|
+ {
|
|
|
+ return isCache;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setIsCache(String isCache)
|
|
|
+ {
|
|
|
+ this.isCache = isCache;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message = "菜单类型不能为空")
|
|
|
+ public String getMenuType()
|
|
|
+ {
|
|
|
+ return menuType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMenuType(String menuType)
|
|
|
+ {
|
|
|
+ this.menuType = menuType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getVisible()
|
|
|
+ {
|
|
|
+ return visible;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setVisible(String visible)
|
|
|
+ {
|
|
|
+ this.visible = visible;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getStatus()
|
|
|
+ {
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStatus(String status)
|
|
|
+ {
|
|
|
+ this.status = status;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
|
|
|
+ public String getPerms()
|
|
|
+ {
|
|
|
+ return perms;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPerms(String perms)
|
|
|
+ {
|
|
|
+ this.perms = perms;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getIcon()
|
|
|
+ {
|
|
|
+ return icon;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setIcon(String icon)
|
|
|
+ {
|
|
|
+ this.icon = icon;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<SysMobileMenu> getChildren()
|
|
|
+ {
|
|
|
+ return children;
|
|
|
+ }
|
|
|
|
|
|
+ public void setChildren(List<SysMobileMenu> children)
|
|
|
+ {
|
|
|
+ this.children = children;
|
|
|
+ }
|
|
|
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
|
|
+ .append("menuId", getMenuId())
|
|
|
+ .append("menuName", getMenuName())
|
|
|
+ .append("parentId", getParentId())
|
|
|
+ .append("orderNum", getOrderNum())
|
|
|
+ .append("path", getPath())
|
|
|
+ .append("component", getComponent())
|
|
|
+ .append("isFrame", getIsFrame())
|
|
|
+ .append("IsCache", getIsCache())
|
|
|
+ .append("menuType", getMenuType())
|
|
|
+ .append("visible", getVisible())
|
|
|
+ .append("status ", getStatus())
|
|
|
+ .append("perms", getPerms())
|
|
|
+ .append("icon", getIcon())
|
|
|
+ .append("createBy", getCreateBy())
|
|
|
+ .append("createTime", getCreateTime())
|
|
|
+ .append("updateBy", getUpdateBy())
|
|
|
+ .append("updateTime", getUpdateTime())
|
|
|
+ .append("remark", getRemark())
|
|
|
+ .toString();
|
|
|
+ }
|
|
|
}
|