Commit 6c1fdabf by naan1993

增加对添加菜单输入信息的为空校验

parent eb18a1a2
...@@ -3,6 +3,7 @@ package com.stylefeng.guns.common.persistence.model; ...@@ -3,6 +3,7 @@ package com.stylefeng.guns.common.persistence.model;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import org.hibernate.validator.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
...@@ -21,183 +22,185 @@ public class Menu extends Model<Menu> { ...@@ -21,183 +22,185 @@ public class Menu extends Model<Menu> {
/** /**
* 主键id * 主键id
*/ */
@TableId(value="id", type= IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
/** /**
* 菜单编号 * 菜单编号
*/ */
private String code; private String code;
/** /**
* 菜单父编号 * 菜单父编号
*/ */
private String pcode; private String pcode;
/** /**
* 当前菜单的所有父菜单编号 * 当前菜单的所有父菜单编号
*/ */
private String pcodes; private String pcodes;
/** /**
* 菜单名称 * 菜单名称
*/ */
private String name; @NotBlank
private String name;
/** /**
* 菜单图标 * 菜单图标
*/ */
private String icon; private String icon;
/** /**
* url地址 * url地址
*/ */
private String url; @NotBlank
private String url;
/** /**
* 菜单排序号 * 菜单排序号
*/ */
private Integer num; private Integer num;
/** /**
* 菜单层级 * 菜单层级
*/ */
private Integer levels; private Integer levels;
/** /**
* 是否是菜单(1:是 0:不是) * 是否是菜单(1:是 0:不是)
*/ */
private Integer ismenu; private Integer ismenu;
/** /**
* 备注 * 备注
*/ */
private String tips; private String tips;
/** /**
* 菜单状态 : 1:启用 0:不启用 * 菜单状态 : 1:启用 0:不启用
*/ */
private Integer status; private Integer status;
/** /**
* 是否打开: 1:打开 0:不打开 * 是否打开: 1:打开 0:不打开
*/ */
private Integer isopen; private Integer isopen;
public Integer getId() { public Integer getId() {
return id; return id;
} }
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String code) { public void setCode(String code) {
this.code = code; this.code = code;
} }
public String getPcode() { public String getPcode() {
return pcode; return pcode;
} }
public void setPcode(String pcode) { public void setPcode(String pcode) {
this.pcode = pcode; this.pcode = pcode;
} }
public String getPcodes() { public String getPcodes() {
return pcodes; return pcodes;
} }
public void setPcodes(String pcodes) { public void setPcodes(String pcodes) {
this.pcodes = pcodes; this.pcodes = pcodes;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
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 String getUrl() { public String getUrl() {
return url; return url;
} }
public void setUrl(String url) { public void setUrl(String url) {
this.url = url; this.url = url;
} }
public Integer getNum() { public Integer getNum() {
return num; return num;
} }
public void setNum(Integer num) { public void setNum(Integer num) {
this.num = num; this.num = num;
} }
public Integer getLevels() { public Integer getLevels() {
return levels; return levels;
} }
public void setLevels(Integer levels) { public void setLevels(Integer levels) {
this.levels = levels; this.levels = levels;
} }
public Integer getIsmenu() { public Integer getIsmenu() {
return ismenu; return ismenu;
} }
public void setIsmenu(Integer ismenu) { public void setIsmenu(Integer ismenu) {
this.ismenu = ismenu; this.ismenu = ismenu;
} }
public String getTips() { public String getTips() {
return tips; return tips;
} }
public void setTips(String tips) { public void setTips(String tips) {
this.tips = tips; this.tips = tips;
} }
public Integer getStatus() { public Integer getStatus() {
return status; return status;
} }
public void setStatus(Integer status) { public void setStatus(Integer status) {
this.status = status; this.status = status;
} }
public Integer getIsopen() { public Integer getIsopen() {
return isopen; return isopen;
} }
public void setIsopen(Integer isopen) { public void setIsopen(Integer isopen) {
this.isopen = isopen; this.isopen = isopen;
} }
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.id; return this.id;
} }
@Override @Override
public String toString() { public String toString() {
return "Menu{" + return "Menu{" +
"id=" + id + "id=" + id +
", code=" + code + ", code=" + code +
", pcode=" + pcode + ", pcode=" + pcode +
", pcodes=" + pcodes + ", pcodes=" + pcodes +
", name=" + name + ", name=" + name +
", icon=" + icon + ", icon=" + icon +
", url=" + url + ", url=" + url +
", num=" + num + ", num=" + num +
", levels=" + levels + ", levels=" + levels +
", ismenu=" + ismenu + ", ismenu=" + ismenu +
", tips=" + tips + ", tips=" + tips +
", status=" + status + ", status=" + status +
", isopen=" + isopen + ", isopen=" + isopen +
"}"; "}";
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment