|
@ -1,15 +1,15 @@ |
|
|
package com.shuili.common.core.domain.entity; |
|
|
package com.shuili.common.core.domain.entity; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import javax.validation.constraints.NotBlank; |
|
|
|
|
|
import javax.validation.constraints.Size; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField; |
|
|
import com.baomidou.mybatisplus.annotation.TableField; |
|
|
import com.baomidou.mybatisplus.annotation.TableName; |
|
|
import com.baomidou.mybatisplus.annotation.TableName; |
|
|
|
|
|
import com.shuili.common.core.domain.BaseEntity; |
|
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
|
import org.apache.commons.lang3.builder.ToStringStyle; |
|
|
import org.apache.commons.lang3.builder.ToStringStyle; |
|
|
import com.shuili.common.core.domain.BaseEntity; |
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotBlank; |
|
|
|
|
|
import javax.validation.constraints.Size; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 菜单权限表 sys_menu |
|
|
* 菜单权限表 sys_menu |
|
@ -17,209 +17,219 @@ import com.shuili.common.core.domain.BaseEntity; |
|
|
* @author shuili |
|
|
* @author shuili |
|
|
*/ |
|
|
*/ |
|
|
@TableName("sys_menu") |
|
|
@TableName("sys_menu") |
|
|
public class SysMenu extends BaseEntity |
|
|
public class SysMenu extends BaseEntity { |
|
|
{ |
|
|
|
|
|
private static final long serialVersionUID = 1L; |
|
|
private static final long serialVersionUID = 1L; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 菜单名称 */ |
|
|
/** |
|
|
|
|
|
* 菜单名称 |
|
|
|
|
|
*/ |
|
|
private String menuName; |
|
|
private String menuName; |
|
|
|
|
|
|
|
|
/** 父菜单名称 */ |
|
|
/** |
|
|
|
|
|
* 父菜单名称 |
|
|
|
|
|
*/ |
|
|
private String parentName; |
|
|
private String parentName; |
|
|
|
|
|
|
|
|
/** 父菜单ID */ |
|
|
/** |
|
|
|
|
|
* 父菜单ID |
|
|
|
|
|
*/ |
|
|
private String parentId; |
|
|
private String parentId; |
|
|
|
|
|
|
|
|
/** 显示顺序 */ |
|
|
/** |
|
|
|
|
|
* 显示顺序 |
|
|
|
|
|
*/ |
|
|
private String orderNum; |
|
|
private String orderNum; |
|
|
|
|
|
|
|
|
/** 路由地址 */ |
|
|
/** |
|
|
|
|
|
* 路由地址 |
|
|
|
|
|
*/ |
|
|
private String path; |
|
|
private String path; |
|
|
|
|
|
|
|
|
/** 组件路径 */ |
|
|
/** |
|
|
|
|
|
* 组件路径 |
|
|
|
|
|
*/ |
|
|
private String component; |
|
|
private String component; |
|
|
|
|
|
|
|
|
/** 是否为外链(0是 1否) */ |
|
|
/** |
|
|
|
|
|
* 是否为外链(0是 1否) |
|
|
|
|
|
*/ |
|
|
private String isFrame; |
|
|
private String isFrame; |
|
|
|
|
|
|
|
|
/** 类型(M目录 C菜单 F按钮) */ |
|
|
/** |
|
|
|
|
|
* 类型(M目录 C菜单 F按钮) |
|
|
|
|
|
*/ |
|
|
private String menuType; |
|
|
private String menuType; |
|
|
|
|
|
|
|
|
/** 显示状态(0显示 1隐藏) */ |
|
|
/** |
|
|
|
|
|
* 显示状态(0显示 1隐藏) |
|
|
|
|
|
*/ |
|
|
private String visible; |
|
|
private String visible; |
|
|
|
|
|
|
|
|
/** 菜单状态(0显示 1隐藏) */ |
|
|
/** |
|
|
|
|
|
* 菜单状态(0显示 1隐藏) |
|
|
|
|
|
*/ |
|
|
private String status; |
|
|
private String status; |
|
|
|
|
|
|
|
|
/** 权限字符串 */ |
|
|
/** |
|
|
|
|
|
* 权限字符串 |
|
|
|
|
|
*/ |
|
|
private String perms; |
|
|
private String perms; |
|
|
|
|
|
|
|
|
/** 菜单图标 */ |
|
|
/** |
|
|
|
|
|
* 菜单图标 |
|
|
|
|
|
*/ |
|
|
private String icon; |
|
|
private String icon; |
|
|
|
|
|
|
|
|
/** 子菜单 */ |
|
|
@TableField(exist = false) |
|
|
|
|
|
private Boolean isMain = false; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子菜单 |
|
|
|
|
|
*/ |
|
|
@TableField(exist = false) |
|
|
@TableField(exist = false) |
|
|
private List<SysMenu> children = new ArrayList<SysMenu>(); |
|
|
private List<SysMenu> children = new ArrayList<SysMenu>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@NotBlank(message = "菜单名称不能为空") |
|
|
@NotBlank(message = "菜单名称不能为空") |
|
|
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") |
|
|
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") |
|
|
public String getMenuName() |
|
|
public String getMenuName() { |
|
|
{ |
|
|
|
|
|
return menuName; |
|
|
return menuName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setMenuName(String menuName) |
|
|
public void setMenuName(String menuName) { |
|
|
{ |
|
|
|
|
|
this.menuName = menuName; |
|
|
this.menuName = menuName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getParentName() |
|
|
public String getParentName() { |
|
|
{ |
|
|
|
|
|
return parentName; |
|
|
return parentName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setParentName(String parentName) |
|
|
public void setParentName(String parentName) { |
|
|
{ |
|
|
|
|
|
this.parentName = parentName; |
|
|
this.parentName = parentName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getParentId() |
|
|
public String getParentId() { |
|
|
{ |
|
|
|
|
|
return parentId; |
|
|
return parentId; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setParentId(String parentId) |
|
|
public void setParentId(String parentId) { |
|
|
{ |
|
|
|
|
|
this.parentId = parentId; |
|
|
this.parentId = parentId; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@NotBlank(message = "显示顺序不能为空") |
|
|
@NotBlank(message = "显示顺序不能为空") |
|
|
public String getOrderNum() |
|
|
public String getOrderNum() { |
|
|
{ |
|
|
|
|
|
return orderNum; |
|
|
return orderNum; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setOrderNum(String orderNum) |
|
|
public void setOrderNum(String orderNum) { |
|
|
{ |
|
|
|
|
|
this.orderNum = orderNum; |
|
|
this.orderNum = orderNum; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符") |
|
|
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符") |
|
|
public String getPath() |
|
|
public String getPath() { |
|
|
{ |
|
|
|
|
|
return path; |
|
|
return path; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setPath(String path) |
|
|
public void setPath(String path) { |
|
|
{ |
|
|
|
|
|
this.path = path; |
|
|
this.path = path; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符") |
|
|
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符") |
|
|
public String getComponent() |
|
|
public String getComponent() { |
|
|
{ |
|
|
|
|
|
return component; |
|
|
return component; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setComponent(String component) |
|
|
public void setComponent(String component) { |
|
|
{ |
|
|
|
|
|
this.component = component; |
|
|
this.component = component; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getIsFrame() |
|
|
public String getIsFrame() { |
|
|
{ |
|
|
|
|
|
return isFrame; |
|
|
return isFrame; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setIsFrame(String isFrame) |
|
|
public void setIsFrame(String isFrame) { |
|
|
{ |
|
|
|
|
|
this.isFrame = isFrame; |
|
|
this.isFrame = isFrame; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@NotBlank(message = "菜单类型不能为空") |
|
|
@NotBlank(message = "菜单类型不能为空") |
|
|
public String getMenuType() |
|
|
public String getMenuType() { |
|
|
{ |
|
|
|
|
|
return menuType; |
|
|
return menuType; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setMenuType(String menuType) |
|
|
public void setMenuType(String menuType) { |
|
|
{ |
|
|
|
|
|
this.menuType = menuType; |
|
|
this.menuType = menuType; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getVisible() |
|
|
public String getVisible() { |
|
|
{ |
|
|
|
|
|
return visible; |
|
|
return visible; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setVisible(String visible) |
|
|
public void setVisible(String visible) { |
|
|
{ |
|
|
|
|
|
this.visible = visible; |
|
|
this.visible = visible; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getStatus() |
|
|
public String getStatus() { |
|
|
{ |
|
|
|
|
|
return status; |
|
|
return status; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setStatus(String status) |
|
|
public void setStatus(String status) { |
|
|
{ |
|
|
|
|
|
this.status = status; |
|
|
this.status = status; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") |
|
|
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") |
|
|
public String getPerms() |
|
|
public String getPerms() { |
|
|
{ |
|
|
|
|
|
return perms; |
|
|
return perms; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setPerms(String perms) |
|
|
public void setPerms(String perms) { |
|
|
{ |
|
|
|
|
|
this.perms = perms; |
|
|
this.perms = perms; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getIcon() |
|
|
public String getIcon() { |
|
|
{ |
|
|
|
|
|
return icon; |
|
|
return icon; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setIcon(String icon) |
|
|
public void setIcon(String icon) { |
|
|
{ |
|
|
|
|
|
this.icon = icon; |
|
|
this.icon = icon; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public List<SysMenu> getChildren() |
|
|
public List<SysMenu> getChildren() { |
|
|
{ |
|
|
|
|
|
return children; |
|
|
return children; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setChildren(List<SysMenu> children) |
|
|
public void setChildren(List<SysMenu> children) { |
|
|
{ |
|
|
|
|
|
this.children = children; |
|
|
this.children = children; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setIsMain(Boolean isMain) { |
|
|
|
|
|
this.isMain = isMain; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Boolean getIsMain() { |
|
|
|
|
|
return isMain; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String toString() { |
|
|
public String toString() { |
|
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
|
|
.append("menuId", getId()) |
|
|
.append("menuId", getId()) |
|
|
.append("menuName", getMenuName()) |
|
|
.append("menuName", getMenuName()) |
|
|
.append("parentId", getParentId()) |
|
|
.append("parentId", getParentId()) |
|
|
.append("orderNum", getOrderNum()) |
|
|
.append("orderNum", getOrderNum()) |
|
|
.append("path", getPath()) |
|
|
.append("path", getPath()) |
|
|
.append("component", getComponent()) |
|
|
.append("component", getComponent()) |
|
|
.append("isFrame", getIsFrame()) |
|
|
.append("isFrame", getIsFrame()) |
|
|
.append("menuType", getMenuType()) |
|
|
.append("menuType", getMenuType()) |
|
|
.append("visible", getVisible()) |
|
|
.append("visible", getVisible()) |
|
|
.append("status ", getStatus()) |
|
|
.append("status ", getStatus()) |
|
|
.append("perms", getPerms()) |
|
|
.append("perms", getPerms()) |
|
|
.append("icon", getIcon()) |
|
|
.append("icon", getIcon()) |
|
|
.append("createBy", getCreateUid()) |
|
|
.append("createBy", getCreateUid()) |
|
|
.append("createTime", getCreateTime()) |
|
|
.append("createTime", getCreateTime()) |
|
|
.append("updateBy", getUpdateUid()) |
|
|
.append("updateBy", getUpdateUid()) |
|
|
.append("updateTime", getUpdateTime()) |
|
|
.append("updateTime", getUpdateTime()) |
|
|
.append("remark", getRemark()) |
|
|
.append("remark", getRemark()) |
|
|
.toString(); |
|
|
.toString(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|