Bladeren bron

修改显示顺序orderNum类型为整型

RuoYi 4 jaren geleden
bovenliggende
commit
6bc77169fe

+ 5 - 4
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java

@@ -4,6 +4,7 @@ import java.util.ArrayList;
4 4
 import java.util.List;
5 5
 import javax.validation.constraints.Email;
6 6
 import javax.validation.constraints.NotBlank;
7
+import javax.validation.constraints.NotNull;
7 8
 import javax.validation.constraints.Size;
8 9
 import org.apache.commons.lang3.builder.ToStringBuilder;
9 10
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -31,7 +32,7 @@ public class SysDept extends BaseEntity
31 32
     private String deptName;
32 33
 
33 34
     /** 显示顺序 */
34
-    private String orderNum;
35
+    private Integer orderNum;
35 36
 
36 37
     /** 负责人 */
37 38
     private String leader;
@@ -96,13 +97,13 @@ public class SysDept extends BaseEntity
96 97
         this.deptName = deptName;
97 98
     }
98 99
 
99
-    @NotBlank(message = "显示顺序不能为空")
100
-    public String getOrderNum()
100
+    @NotNull(message = "显示顺序不能为空")
101
+    public Integer getOrderNum()
101 102
     {
102 103
         return orderNum;
103 104
     }
104 105
 
105
-    public void setOrderNum(String orderNum)
106
+    public void setOrderNum(Integer orderNum)
106 107
     {
107 108
         this.orderNum = orderNum;
108 109
     }

+ 3 - 3
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
91 91
  			<if test="parentId != null and parentId != 0">parent_id,</if>
92 92
  			<if test="deptName != null and deptName != ''">dept_name,</if>
93 93
  			<if test="ancestors != null and ancestors != ''">ancestors,</if>
94
- 			<if test="orderNum != null and orderNum != ''">order_num,</if>
94
+ 			<if test="orderNum != null">order_num,</if>
95 95
  			<if test="leader != null and leader != ''">leader,</if>
96 96
  			<if test="phone != null and phone != ''">phone,</if>
97 97
  			<if test="email != null and email != ''">email,</if>
@@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
103 103
  			<if test="parentId != null and parentId != 0">#{parentId},</if>
104 104
  			<if test="deptName != null and deptName != ''">#{deptName},</if>
105 105
  			<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
106
- 			<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
106
+ 			<if test="orderNum != null">#{orderNum},</if>
107 107
  			<if test="leader != null and leader != ''">#{leader},</if>
108 108
  			<if test="phone != null and phone != ''">#{phone},</if>
109 109
  			<if test="email != null and email != ''">#{email},</if>
@@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
119 119
  			<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
120 120
  			<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
121 121
  			<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
122
- 			<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
122
+ 			<if test="orderNum != null">order_num = #{orderNum},</if>
123 123
  			<if test="leader != null">leader = #{leader},</if>
124 124
  			<if test="phone != null">phone = #{phone},</if>
125 125
  			<if test="email != null">email = #{email},</if>

+ 3 - 3
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -130,7 +130,7 @@
130 130
 		<set>
131 131
 			<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
132 132
 			<if test="parentId != null">parent_id = #{parentId},</if>
133
-			<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
133
+			<if test="orderNum != null">order_num = #{orderNum},</if>
134 134
 			<if test="path != null and path != ''">path = #{path},</if>
135 135
 			<if test="component != null">component = #{component},</if>
136 136
 			<if test="query != null">`query` = #{query},</if>
@@ -153,7 +153,7 @@
153 153
 		<if test="menuId != null and menuId != 0">menu_id,</if>
154 154
 		<if test="parentId != null and parentId != 0">parent_id,</if>
155 155
 		<if test="menuName != null and menuName != ''">menu_name,</if>
156
-		<if test="orderNum != null and orderNum != ''">order_num,</if>
156
+		<if test="orderNum != null">order_num,</if>
157 157
 		<if test="path != null and path != ''">path,</if>
158 158
 		<if test="component != null and component != ''">component,</if>
159 159
 		<if test="query != null and query != ''">`query`,</if>
@@ -171,7 +171,7 @@
171 171
 		<if test="menuId != null and menuId != 0">#{menuId},</if>
172 172
 		<if test="parentId != null and parentId != 0">#{parentId},</if>
173 173
 		<if test="menuName != null and menuName != ''">#{menuName},</if>
174
-		<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
174
+		<if test="orderNum != null">#{orderNum},</if>
175 175
 		<if test="path != null and path != ''">#{path},</if>
176 176
 		<if test="component != null and component != ''">#{component},</if>
177 177
 		<if test="query != null and query != ''">#{query},</if>