From bcee37b84bde39072e6e35e642b0911a94f52eef Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 11 十一月 2019 08:59:15 +0800
Subject: [PATCH] 若依 1.1

---
 ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java b/ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java
index 73303d2..baeeeed 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java
@@ -1,8 +1,12 @@
 package com.ruoyi.project.system.domain;
 
-import java.util.List;
-import com.ruoyi.framework.web.domain.BaseEntity;
 import java.util.ArrayList;
+import java.util.List;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.framework.web.domain.BaseEntity;
 
 /**
  * 菜单权限表 sys_menu
@@ -62,6 +66,8 @@
         this.menuId = menuId;
     }
 
+    @NotBlank(message = "菜单名称不能为空")
+    @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
     public String getMenuName()
     {
         return menuName;
@@ -92,6 +98,7 @@
         this.parentId = parentId;
     }
 
+    @NotBlank(message = "显示顺序不能为空")
     public String getOrderNum()
     {
         return orderNum;
@@ -102,6 +109,7 @@
         this.orderNum = orderNum;
     }
 
+    @Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
     public String getPath()
     {
         return path;
@@ -112,6 +120,7 @@
         this.path = path;
     }
 
+    @Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
     public String getComponent()
     {
         return component;
@@ -132,6 +141,7 @@
         this.isFrame = isFrame;
     }
 
+    @NotBlank(message = "菜单类型不能为空")
     public String getMenuType()
     {
         return menuType;
@@ -152,6 +162,7 @@
         this.visible = visible;
     }
 
+    @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
     public String getPerms()
     {
         return perms;
@@ -181,4 +192,26 @@
     {
         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("menuType", getMenuType())
+            .append("visible", getVisible())
+            .append("perms", getPerms())
+            .append("icon", getIcon())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
 }

--
Gitblit v1.9.2