Browse Source

修正菜单状态类型

RuoYi 6 năm trước cách đây
mục cha
commit
b0f9dc804a

+ 1 - 1
sql/ry_20180808.sql

@@ -133,7 +133,7 @@ create table sys_menu (
   order_num 		int(4) 			default null 			   comment '显示顺序',
   url 				varchar(200) 	default ''				   comment '请求地址',
   menu_type 		char(1) 		default '' 			       comment '菜单类型(M目录 C菜单 F按钮)',
-  visible 			char(1) 		default 0 				   comment '菜单状态(0显示 1隐藏)',
+  visible 			char(1) 		not null 				   comment '菜单状态(0显示 1隐藏)',
   perms 			varchar(100) 	default '' 				   comment '权限标识',
   icon 				varchar(100) 	default '' 				   comment '菜单图标',
   create_by         varchar(64)     default ''                 comment '创建者',

+ 3 - 3
src/main/java/com/ruoyi/project/system/menu/domain/Menu.java

@@ -27,7 +27,7 @@ public class Menu extends BaseEntity
     /** 类型:0目录,1菜单,2按钮 */
     private String menuType;
     /** 菜单状态:0显示,1隐藏 */
-    private Integer visible;
+    private String visible;
     /** 权限字符串 */
     private String perms;
     /** 菜单图标 */
@@ -105,12 +105,12 @@ public class Menu extends BaseEntity
         this.menuType = menuType;
     }
 
-    public Integer getVisible()
+    public String getVisible()
     {
         return visible;
     }
 
-    public void setVisible(Integer visible)
+    public void setVisible(String visible)
     {
         this.visible = visible;
     }

+ 1 - 1
src/main/resources/mybatis/system/MenuMapper.xml

@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="menuName != null and menuName != ''">
 				AND menu_name like concat('%', #{menuName}, '%')
 			</if>
-			<if test="visible != null">
+			<if test="visible != null and visible != ''">
 				AND visible = #{visible}
 			</if>
 		</where>