Selaa lähdekoodia

消除Vue3控制台出现的警告信息

RuoYi 3 vuotta sitten
vanhempi
commit
b1a67a113e

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

@@ -2,6 +2,7 @@ package com.ruoyi.system.api.domain;
2 2
 
3 3
 import java.util.Set;
4 4
 import javax.validation.constraints.NotBlank;
5
+import javax.validation.constraints.NotNull;
5 6
 import javax.validation.constraints.Size;
6 7
 import org.apache.commons.lang3.builder.ToStringBuilder;
7 8
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -32,7 +33,7 @@ public class SysRole extends BaseEntity
32 33
 
33 34
     /** 角色排序 */
34 35
     @Excel(name = "角色排序")
35
-    private String roleSort;
36
+    private Integer roleSort;
36 37
 
37 38
     /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */
38 39
     @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
@@ -117,13 +118,13 @@ public class SysRole extends BaseEntity
117 118
         this.roleKey = roleKey;
118 119
     }
119 120
 
120
-    @NotBlank(message = "显示顺序不能为空")
121
-    public String getRoleSort()
121
+    @NotNull(message = "显示顺序不能为空")
122
+    public Integer getRoleSort()
122 123
     {
123 124
         return roleSort;
124 125
     }
125 126
 
126
-    public void setRoleSort(String roleSort)
127
+    public void setRoleSort(Integer roleSort)
127 128
     {
128 129
         this.roleSort = roleSort;
129 130
     }

+ 3 - 18
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm

@@ -136,24 +136,9 @@
136 136
 #end
137 137
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
138 138
         <template #default="scope">
139
-          <el-button
140
-            type="text"
141
-            icon="Edit"
142
-            @click="handleUpdate(scope.row)"
143
-            v-hasPermi="['${moduleName}:${businessName}:edit']"
144
-          >修改</el-button>
145
-          <el-button
146
-            type="text"
147
-            icon="Plus"
148
-            @click="handleAdd(scope.row)"
149
-            v-hasPermi="['${moduleName}:${businessName}:add']"
150
-          >新增</el-button>
151
-          <el-button
152
-            type="text"
153
-            icon="Delete"
154
-            @click="handleDelete(scope.row)"
155
-            v-hasPermi="['${moduleName}:${businessName}:remove']"
156
-          >删除</el-button>
139
+          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
140
+          <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
141
+          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
157 142
         </template>
158 143
       </el-table-column>
159 144
     </el-table>

+ 2 - 12
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm

@@ -148,18 +148,8 @@
148 148
 #end
149 149
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
150 150
         <template #default="scope">
151
-          <el-button
152
-            type="text"
153
-            icon="Edit"
154
-            @click="handleUpdate(scope.row)"
155
-            v-hasPermi="['${moduleName}:${businessName}:edit']"
156
-          >修改</el-button>
157
-          <el-button
158
-            type="text"
159
-            icon="Delete"
160
-            @click="handleDelete(scope.row)"
161
-            v-hasPermi="['${moduleName}:${businessName}:remove']"
162
-          >删除</el-button>
151
+          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
152
+          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
163 153
         </template>
164 154
       </el-table-column>
165 155
     </el-table>

+ 57 - 57
ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java

@@ -1,57 +1,57 @@
1
-package com.ruoyi.job.config;
2
-
3
-import java.util.Properties;
4
-import javax.sql.DataSource;
5
-import org.springframework.context.annotation.Bean;
6
-import org.springframework.context.annotation.Configuration;
7
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
8
-
9
-/**
10
- * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
11
- * 
12
- * @author ruoyi
13
- */
14
-@Configuration
15
-public class ScheduleConfig
16
-{
17
-    @Bean
18
-    public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
19
-    {
20
-        SchedulerFactoryBean factory = new SchedulerFactoryBean();
21
-        factory.setDataSource(dataSource);
22
-
23
-        // quartz参数
24
-        Properties prop = new Properties();
25
-        prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
26
-        prop.put("org.quartz.scheduler.instanceId", "AUTO");
27
-        // 线程池配置
28
-        prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
29
-        prop.put("org.quartz.threadPool.threadCount", "20");
30
-        prop.put("org.quartz.threadPool.threadPriority", "5");
31
-        // JobStore配置
32
-        prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
33
-        // 集群配置
34
-        prop.put("org.quartz.jobStore.isClustered", "true");
35
-        prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
36
-        prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
37
-        prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
38
-
39
-        // sqlserver 启用
40
-        // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
41
-        prop.put("org.quartz.jobStore.misfireThreshold", "12000");
42
-        prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
43
-        factory.setQuartzProperties(prop);
44
-
45
-        factory.setSchedulerName("RuoyiScheduler");
46
-        // 延时启动
47
-        factory.setStartupDelay(1);
48
-        factory.setApplicationContextSchedulerContextKey("applicationContextKey");
49
-        // 可选,QuartzScheduler
50
-        // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
51
-        factory.setOverwriteExistingJobs(true);
52
-        // 设置自动启动,默认为true
53
-        factory.setAutoStartup(true);
54
-
55
-        return factory;
56
-    }
57
-}
1
+//package com.ruoyi.job.config;
2
+//
3
+//import java.util.Properties;
4
+//import javax.sql.DataSource;
5
+//import org.springframework.context.annotation.Bean;
6
+//import org.springframework.context.annotation.Configuration;
7
+//import org.springframework.scheduling.quartz.SchedulerFactoryBean;
8
+//
9
+///**
10
+// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
11
+// * 
12
+// * @author ruoyi
13
+// */
14
+//@Configuration
15
+//public class ScheduleConfig
16
+//{
17
+//    @Bean
18
+//    public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
19
+//    {
20
+//        SchedulerFactoryBean factory = new SchedulerFactoryBean();
21
+//        factory.setDataSource(dataSource);
22
+//
23
+//        // quartz参数
24
+//        Properties prop = new Properties();
25
+//        prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
26
+//        prop.put("org.quartz.scheduler.instanceId", "AUTO");
27
+//        // 线程池配置
28
+//        prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
29
+//        prop.put("org.quartz.threadPool.threadCount", "20");
30
+//        prop.put("org.quartz.threadPool.threadPriority", "5");
31
+//        // JobStore配置
32
+//        prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
33
+//        // 集群配置
34
+//        prop.put("org.quartz.jobStore.isClustered", "true");
35
+//        prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
36
+//        prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
37
+//        prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
38
+//
39
+//        // sqlserver 启用
40
+//        // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
41
+//        prop.put("org.quartz.jobStore.misfireThreshold", "12000");
42
+//        prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
43
+//        factory.setQuartzProperties(prop);
44
+//
45
+//        factory.setSchedulerName("RuoyiScheduler");
46
+//        // 延时启动
47
+//        factory.setStartupDelay(1);
48
+//        factory.setApplicationContextSchedulerContextKey("applicationContextKey");
49
+//        // 可选,QuartzScheduler
50
+//        // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
51
+//        factory.setOverwriteExistingJobs(true);
52
+//        // 设置自动启动,默认为true
53
+//        factory.setAutoStartup(true);
54
+//
55
+//        return factory;
56
+//    }
57
+//}

+ 5 - 4
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.system.domain;
2 2
 
3 3
 import javax.validation.constraints.NotBlank;
4
+import javax.validation.constraints.NotNull;
4 5
 import javax.validation.constraints.Size;
5 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6 7
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -31,7 +32,7 @@ public class SysPost extends BaseEntity
31 32
 
32 33
     /** 岗位排序 */
33 34
     @Excel(name = "岗位排序")
34
-    private String postSort;
35
+    private Integer postSort;
35 36
 
36 37
     /** 状态(0正常 1停用) */
37 38
     @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
@@ -74,13 +75,13 @@ public class SysPost extends BaseEntity
74 75
         this.postName = postName;
75 76
     }
76 77
 
77
-    @NotBlank(message = "显示顺序不能为空")
78
-    public String getPostSort()
78
+    @NotNull(message = "显示顺序不能为空")
79
+    public Integer getPostSort()
79 80
     {
80 81
         return postSort;
81 82
     }
82 83
 
83
-    public void setPostSort(String postSort)
84
+    public void setPostSort(Integer postSort)
84 85
     {
85 86
         this.postSort = postSort;
86 87
     }

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

@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
77 77
  		<set>
78 78
  			<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
79 79
  			<if test="postName != null and postName != ''">post_name = #{postName},</if>
80
- 			<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
80
+ 			<if test="postSort != null">post_sort = #{postSort},</if>
81 81
  			<if test="status != null and status != ''">status = #{status},</if>
82 82
  			<if test="remark != null">remark = #{remark},</if>
83 83
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
91 91
  			<if test="postId != null and postId != 0">post_id,</if>
92 92
  			<if test="postCode != null and postCode != ''">post_code,</if>
93 93
  			<if test="postName != null and postName != ''">post_name,</if>
94
- 			<if test="postSort != null and postSort != ''">post_sort,</if>
94
+ 			<if test="postSort != null">post_sort,</if>
95 95
  			<if test="status != null and status != ''">status,</if>
96 96
  			<if test="remark != null and remark != ''">remark,</if>
97 97
  			<if test="createBy != null and createBy != ''">create_by,</if>
@@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
100 100
  			<if test="postId != null and postId != 0">#{postId},</if>
101 101
  			<if test="postCode != null and postCode != ''">#{postCode},</if>
102 102
  			<if test="postName != null and postName != ''">#{postName},</if>
103
- 			<if test="postSort != null and postSort != ''">#{postSort},</if>
103
+ 			<if test="postSort != null">#{postSort},</if>
104 104
  			<if test="status != null and status != ''">#{status},</if>
105 105
  			<if test="remark != null and remark != ''">#{remark},</if>
106 106
  			<if test="createBy != null and createBy != ''">#{createBy},</if>

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

@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
98 98
  			<if test="roleId != null and roleId != 0">role_id,</if>
99 99
  			<if test="roleName != null and roleName != ''">role_name,</if>
100 100
  			<if test="roleKey != null and roleKey != ''">role_key,</if>
101
- 			<if test="roleSort != null and roleSort != ''">role_sort,</if>
101
+ 			<if test="roleSort != null">role_sort,</if>
102 102
  			<if test="dataScope != null and dataScope != ''">data_scope,</if>
103 103
  			<if test="menuCheckStrictly != null">menu_check_strictly,</if>
104 104
  			<if test="deptCheckStrictly != null">dept_check_strictly,</if>
@@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
110 110
  			<if test="roleId != null and roleId != 0">#{roleId},</if>
111 111
  			<if test="roleName != null and roleName != ''">#{roleName},</if>
112 112
  			<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
113
- 			<if test="roleSort != null and roleSort != ''">#{roleSort},</if>
113
+ 			<if test="roleSort != null">#{roleSort},</if>
114 114
  			<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
115 115
  			<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
116 116
  			<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
@@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
126 126
  		<set>
127 127
  			<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
128 128
  			<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
129
- 			<if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
129
+ 			<if test="roleSort != null">role_sort = #{roleSort},</if>
130 130
  			<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
131 131
  			<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
132 132
  			<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>