From 6474a17100283b3df470a203e06fa74b5b19181f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Nov 2022 19:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=99=A4Vue3=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E5=87=BA=E7=8E=B0=E7=9A=84=E8=AD=A6=E5=91=8A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/domain/entity/SysRole.java | 9 ++++---- .../resources/vm/vue/v3/index-tree.vue.vm | 21 +++---------------- .../src/main/resources/vm/vue/v3/index.vue.vm | 14 ++----------- .../java/com/ruoyi/system/domain/SysPost.java | 9 ++++---- .../resources/mapper/system/SysPostMapper.xml | 6 +++--- .../resources/mapper/system/SysRoleMapper.xml | 6 +++--- 6 files changed, 21 insertions(+), 44 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java index 8c891cb..2396f80 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java @@ -2,6 +2,7 @@ package com.ruoyi.common.core.domain.entity; import java.util.Set; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -32,7 +33,7 @@ public class SysRole extends BaseEntity /** 角色排序 */ @Excel(name = "角色排序") - private String roleSort; + private Integer roleSort; /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */ @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") @@ -117,13 +118,13 @@ public class SysRole extends BaseEntity this.roleKey = roleKey; } - @NotBlank(message = "显示顺序不能为空") - public String getRoleSort() + @NotNull(message = "显示顺序不能为空") + public Integer getRoleSort() { return roleSort; } - public void setRoleSort(String roleSort) + public void setRoleSort(Integer roleSort) { this.roleSort = roleSort; } diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm index 862297c..1294525 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -136,24 +136,9 @@ #end diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index f66cc3b..8fae449 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -148,18 +148,8 @@ #end diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java index 1e7556b..a36ed79 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java @@ -1,6 +1,7 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -31,7 +32,7 @@ public class SysPost extends BaseEntity /** 岗位排序 */ @Excel(name = "岗位排序") - private String postSort; + private Integer postSort; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @@ -74,13 +75,13 @@ public class SysPost extends BaseEntity this.postName = postName; } - @NotBlank(message = "显示顺序不能为空") - public String getPostSort() + @NotNull(message = "显示顺序不能为空") + public Integer getPostSort() { return postSort; } - public void setPostSort(String postSort) + public void setPostSort(Integer postSort) { this.postSort = postSort; } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 2425ae0..faefb2f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" post_code = #{postCode}, post_name = #{postName}, - post_sort = #{postSort}, + post_sort = #{postSort}, status = #{status}, remark = #{remark}, update_by = #{updateBy}, @@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" post_id, post_code, post_name, - post_sort, + post_sort, status, remark, create_by, @@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{postId}, #{postCode}, #{postName}, - #{postSort}, + #{postSort}, #{status}, #{remark}, #{createBy}, diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index 12e7f78..ab601e4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" role_id, role_name, role_key, - role_sort, + role_sort, data_scope, menu_check_strictly, dept_check_strictly, @@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{roleId}, #{roleName}, #{roleKey}, - #{roleSort}, + #{roleSort}, #{dataScope}, #{menuCheckStrictly}, #{deptCheckStrictly}, @@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" role_name = #{roleName}, role_key = #{roleKey}, - role_sort = #{roleSort}, + role_sort = #{roleSort}, data_scope = #{dataScope}, menu_check_strictly = #{menuCheckStrictly}, dept_check_strictly = #{deptCheckStrictly},