From b1a67a113e03f56345afdd8ef91cfa7c2529ec65 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 21 Nov 2022 19:46:47 +0800
Subject: [PATCH] 消除Vue3控制台出现的警告信息
---
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java | 9 +-
ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java | 114 +++++++++++++++++++-------------------
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm | 14 ----
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm | 21 +------
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java | 9 +-
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml | 6 +-
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 6 +-
7 files changed, 78 insertions(+), 101 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java
index 04a4d0e..f224b42 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java
@@ -2,6 +2,7 @@
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 @@
/** 角色排序 */
@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 @@
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-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
index 862297c..1294525 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
@@ -136,24 +136,9 @@
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button
- type="text"
- icon="Edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:edit']"
- >修改</el-button>
- <el-button
- type="text"
- icon="Plus"
- @click="handleAdd(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:add']"
- >新增</el-button>
- <el-button
- type="text"
- icon="Delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:remove']"
- >删除</el-button>
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
+ <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
index f66cc3b..8fae449 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
@@ -148,18 +148,8 @@
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button
- type="text"
- icon="Edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:edit']"
- >修改</el-button>
- <el-button
- type="text"
- icon="Delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:remove']"
- >删除</el-button>
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
index d002686..fb4086e 100644
--- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
+++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
@@ -1,57 +1,57 @@
-package com.ruoyi.job.config;
-
-import java.util.Properties;
-import javax.sql.DataSource;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-
-/**
- * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
- *
- * @author ruoyi
- */
-@Configuration
-public class ScheduleConfig
-{
- @Bean
- public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
- {
- SchedulerFactoryBean factory = new SchedulerFactoryBean();
- factory.setDataSource(dataSource);
-
- // quartz参数
- Properties prop = new Properties();
- prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
- prop.put("org.quartz.scheduler.instanceId", "AUTO");
- // 线程池配置
- prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
- prop.put("org.quartz.threadPool.threadCount", "20");
- prop.put("org.quartz.threadPool.threadPriority", "5");
- // JobStore配置
- prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
- // 集群配置
- prop.put("org.quartz.jobStore.isClustered", "true");
- prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
- prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
- prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
-
- // sqlserver 启用
- // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
- prop.put("org.quartz.jobStore.misfireThreshold", "12000");
- prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
- factory.setQuartzProperties(prop);
-
- factory.setSchedulerName("RuoyiScheduler");
- // 延时启动
- factory.setStartupDelay(1);
- factory.setApplicationContextSchedulerContextKey("applicationContextKey");
- // 可选,QuartzScheduler
- // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
- factory.setOverwriteExistingJobs(true);
- // 设置自动启动,默认为true
- factory.setAutoStartup(true);
-
- return factory;
- }
-}
+//package com.ruoyi.job.config;
+//
+//import java.util.Properties;
+//import javax.sql.DataSource;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+//
+///**
+// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
+// *
+// * @author ruoyi
+// */
+//@Configuration
+//public class ScheduleConfig
+//{
+// @Bean
+// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
+// {
+// SchedulerFactoryBean factory = new SchedulerFactoryBean();
+// factory.setDataSource(dataSource);
+//
+// // quartz参数
+// Properties prop = new Properties();
+// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
+// prop.put("org.quartz.scheduler.instanceId", "AUTO");
+// // 线程池配置
+// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
+// prop.put("org.quartz.threadPool.threadCount", "20");
+// prop.put("org.quartz.threadPool.threadPriority", "5");
+// // JobStore配置
+// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
+// // 集群配置
+// prop.put("org.quartz.jobStore.isClustered", "true");
+// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
+// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
+// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
+//
+// // sqlserver 启用
+// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
+// prop.put("org.quartz.jobStore.misfireThreshold", "12000");
+// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
+// factory.setQuartzProperties(prop);
+//
+// factory.setSchedulerName("RuoyiScheduler");
+// // 延时启动
+// factory.setStartupDelay(1);
+// factory.setApplicationContextSchedulerContextKey("applicationContextKey");
+// // 可选,QuartzScheduler
+// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
+// factory.setOverwriteExistingJobs(true);
+// // 设置自动启动,默认为true
+// factory.setAutoStartup(true);
+//
+// return factory;
+// }
+//}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
index b5a1e9d..7c03fbd 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
+++ b/ruoyi-modules/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 @@
/** 岗位排序 */
@Excel(name = "岗位排序")
- private String postSort;
+ private Integer postSort;
/** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
@@ -74,13 +75,13 @@
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-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
index 2425ae0..faefb2f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -77,7 +77,7 @@
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="postName != null and postName != ''">post_name = #{postName},</if>
- <if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
+ <if test="postSort != null">post_sort = #{postSort},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@@ -91,7 +91,7 @@
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="postName != null and postName != ''">post_name,</if>
- <if test="postSort != null and postSort != ''">post_sort,</if>
+ <if test="postSort != null">post_sort,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
@@ -100,7 +100,7 @@
<if test="postId != null and postId != 0">#{postId},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="postName != null and postName != ''">#{postName},</if>
- <if test="postSort != null and postSort != ''">#{postSort},</if>
+ <if test="postSort != null">#{postSort},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 12e7f78..ab601e4 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -98,7 +98,7 @@
<if test="roleId != null and roleId != 0">role_id,</if>
<if test="roleName != null and roleName != ''">role_name,</if>
<if test="roleKey != null and roleKey != ''">role_key,</if>
- <if test="roleSort != null and roleSort != ''">role_sort,</if>
+ <if test="roleSort != null">role_sort,</if>
<if test="dataScope != null and dataScope != ''">data_scope,</if>
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
@@ -110,7 +110,7 @@
<if test="roleId != null and roleId != 0">#{roleId},</if>
<if test="roleName != null and roleName != ''">#{roleName},</if>
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
- <if test="roleSort != null and roleSort != ''">#{roleSort},</if>
+ <if test="roleSort != null">#{roleSort},</if>
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
@@ -126,7 +126,7 @@
<set>
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
- <if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
+ <if test="roleSort != null">role_sort = #{roleSort},</if>
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
--
Gitblit v1.9.3