diff --git a/pom.xml b/pom.xml
index 5264fd30..903180b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,14 +6,14 @@
com.ruoyi
ruoyi
- 3.8.5
+ 3.8.6
ruoyi
http://www.ruoyi.vip
若依管理系统
- 3.8.5
+ 3.8.6
UTF-8
UTF-8
1.8
@@ -23,8 +23,8 @@
3.0.0
2.3.3
1.4.6
- 2.0.25
- 6.4.0
+ 2.0.34
+ 6.4.3
2.11.0
3.2.2
4.1.2
@@ -41,7 +41,7 @@
org.springframework.boot
spring-boot-dependencies
- 2.5.14
+ 2.5.15
pom
import
@@ -207,11 +207,6 @@
pom
-
-
-
-
-
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 5eea77e9..e1c5684b 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
jar
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 9a309691..183c728c 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -3,7 +3,7 @@ ruoyi:
# 名称
name: RuoYi
# 版本
- version: 3.8.5
+ version: 3.8.6
# 版权年份
copyrightYear: 2023
# 实例演示开关
@@ -12,7 +12,7 @@ ruoyi:
profile: D:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false
- # 验证码类型 math 数组计算 char 字符验证
+ # 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 开发环境配置
@@ -53,15 +53,15 @@ spring:
messages:
# 国际化资源文件路径
basename: i18n/messages
- profiles:
+ profiles:
active: druid
# 文件上传
servlet:
- multipart:
- # 单个文件大小
- max-file-size: 10MB
- # 设置总上传的文件大小
- max-request-size: 20MB
+ multipart:
+ # 单个文件大小
+ max-file-size: 10MB
+ # 设置总上传的文件大小
+ max-request-size: 20MB
# 服务模块
devtools:
restart:
@@ -76,7 +76,7 @@ spring:
# 数据库索引
database: 0
# 密码
- password:
+ password:
# 连接超时时间
timeout: 10s
lettuce:
@@ -92,27 +92,27 @@ spring:
# token配置
token:
- # 令牌自定义标识
- header: Authorization
- # 令牌密钥
- secret: abcdefghijklmnopqrstuvwxyz
- # 令牌有效期(默认30分钟)
- expireTime: 30
-
+ # 令牌自定义标识
+ header: Authorization
+ # 令牌密钥
+ secret: abcdefghijklmnopqrstuvwxyz
+ # 令牌有效期(默认30分钟)
+ expireTime: 30
+
# MyBatis配置
mybatis:
- # 搜索指定包别名
- typeAliasesPackage: com.ruoyi.**.domain
- # 配置mapper的扫描,找到所有的mapper.xml映射文件
- mapperLocations: classpath*:mapper/**/*Mapper.xml
- # 加载全局的配置文件
- configLocation: classpath:mybatis/mybatis-config.xml
+ # 搜索指定包别名
+ typeAliasesPackage: com.ruoyi.**.domain
+ # 配置mapper的扫描,找到所有的mapper.xml映射文件
+ mapperLocations: classpath*:mapper/**/*Mapper.xml
+ # 加载全局的配置文件
+ configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
-pagehelper:
+pagehelper:
helperDialect: mysql
supportMethodsArguments: true
- params: count=countSql
+ params: count=countSql
# Swagger配置
swagger:
@@ -122,7 +122,7 @@ swagger:
pathMapping: /dev-api
# 防止XSS攻击
-xss:
+xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index a517e267..35e34b7b 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
index c6c8bc59..d534a3eb 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
@@ -59,12 +59,12 @@ public @interface Excel
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
/**
- * 导出时在excel中每个列的高度 单位为字符
+ * 导出时在excel中每个列的高度
*/
public double height() default 14;
/**
- * 导出时在excel中每个列的宽 单位为字符
+ * 导出时在excel中每个列的宽度
*/
public double width() default 16;
@@ -114,7 +114,7 @@ public @interface Excel
public ColumnType cellType() default ColumnType.STRING;
/**
- * 导出列头背景色
+ * 导出列头背景颜色
*/
public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
@@ -124,7 +124,7 @@ public @interface Excel
public IndexedColors headerColor() default IndexedColors.WHITE;
/**
- * 导出单元格背景色
+ * 导出单元格背景颜色
*/
public IndexedColors backgroundColor() default IndexedColors.WHITE;
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
index 790753d6..42dcbcde 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
@@ -1,6 +1,7 @@
package com.ruoyi.common.core.domain;
import java.util.HashMap;
+import java.util.Objects;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.utils.StringUtils;
@@ -169,6 +170,36 @@ public class AjaxResult extends HashMap
return new AjaxResult(code, msg, null);
}
+ /**
+ * 是否为成功消息
+ *
+ * @return 结果
+ */
+ public boolean isSuccess()
+ {
+ return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
+ }
+
+ /**
+ * 是否为警告消息
+ *
+ * @return 结果
+ */
+ public boolean isWarn()
+ {
+ return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG));
+ }
+
+ /**
+ * 是否为错误消息
+ *
+ * @return 结果
+ */
+ public boolean isError()
+ {
+ return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG));
+ }
+
/**
* 方便链式调用
*
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
index 41490e77..95e169cf 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
@@ -1,11 +1,11 @@
package com.ruoyi.common.core.domain.model;
-import java.util.Collection;
-import java.util.Set;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
import com.alibaba.fastjson2.annotation.JSONField;
import com.ruoyi.common.core.domain.entity.SysUser;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import java.util.Collection;
+import java.util.Set;
/**
* 登录用户身份权限
@@ -71,6 +71,24 @@ public class LoginUser implements UserDetails
*/
private SysUser user;
+ public LoginUser()
+ {
+ }
+
+ public LoginUser(SysUser user, Set permissions)
+ {
+ this.user = user;
+ this.permissions = permissions;
+ }
+
+ public LoginUser(Long userId, Long deptId, SysUser user, Set permissions)
+ {
+ this.userId = userId;
+ this.deptId = deptId;
+ this.user = user;
+ this.permissions = permissions;
+ }
+
public Long getUserId()
{
return userId;
@@ -101,24 +119,6 @@ public class LoginUser implements UserDetails
this.token = token;
}
- public LoginUser()
- {
- }
-
- public LoginUser(SysUser user, Set permissions)
- {
- this.user = user;
- this.permissions = permissions;
- }
-
- public LoginUser(Long userId, Long deptId, SysUser user, Set permissions)
- {
- this.userId = userId;
- this.deptId = deptId;
- this.user = user;
- this.permissions = permissions;
- }
-
@JSONField(serialize = false)
@Override
public String getPassword()
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
index 04c87d8a..20dbbb74 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
@@ -147,7 +147,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
/**
* 计算时间差
*
- * @param endTime 最后时间
+ * @param endDate 最后时间
* @param startTime 开始时间
* @return 时间差(天/小时/分钟)
*/
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
index f2203ae8..aa34b03d 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
@@ -325,9 +325,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
/**
- * 判断给定的set列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
+ * 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
*
- * @param set 给定的集合
+ * @param collection 给定的集合
* @param array 给定的数组
* @return boolean 结果
*/
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
index 4330d8fd..cbe47b6c 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
@@ -98,6 +98,11 @@ public class ExcelUtil
public static final String[] FORMULA_STR = { "=", "-", "+", "@" };
+ /**
+ * 用于dictType属性数据存储,避免重复查缓存
+ */
+ public Map sysDictMap = new HashMap();
+
/**
* Excel sheet最大行数,默认65536
*/
@@ -1034,7 +1039,12 @@ public class ExcelUtil
}
else if (StringUtils.isNotEmpty(dictType) && StringUtils.isNotNull(value))
{
- cell.setCellValue(convertDictByExp(Convert.toStr(value), dictType, separator));
+ if (!sysDictMap.containsKey(dictType + value))
+ {
+ String lable = convertDictByExp(Convert.toStr(value), dictType, separator);
+ sysDictMap.put(dictType + value, lable);
+ }
+ cell.setCellValue(sysDictMap.get(dictType + value));
}
else if (value instanceof BigDecimal && -1 != attr.scale())
{
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java
index 40a800da..9f40118c 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java
@@ -20,6 +20,11 @@ public class SqlUtil
*/
public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+";
+ /**
+ * 限制orderBy最大长度
+ */
+ private static final int ORDER_BY_MAX_LENGTH = 500;
+
/**
* 检查字符,防止注入绕过
*/
@@ -29,6 +34,10 @@ public class SqlUtil
{
throw new UtilException("参数不符合规范,不能进行查询");
}
+ if (StringUtils.length(value) > ORDER_BY_MAX_LENGTH)
+ {
+ throw new UtilException("参数已超过最大限制,不能进行查询");
+ }
return value;
}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java
index c0c18af0..97497f28 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java
@@ -66,7 +66,7 @@ public final class UUID implements java.io.Serializable, Comparable
}
/**
- * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的本地线程伪随机数生成器生成该 UUID。
+ * 获取类型 4(伪随机生成的)UUID 的静态工厂。
*
* @return 随机生成的 {@code UUID}
*/
diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml
index a2ccee29..90e29185 100644
--- a/ruoyi-framework/pom.xml
+++ b/ruoyi-framework/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
@@ -41,7 +41,7 @@
kaptcha
- javax.servlet-api
+ servlet-api
javax.servlet
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java
index 20a0dda4..859a7824 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java
@@ -14,7 +14,7 @@ public class DynamicDataSourceContextHolder
/**
* 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本,
- * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。
+ * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。
*/
private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>();
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
index bf0a7ed8..d4d64212 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
@@ -7,8 +7,10 @@ import org.springframework.security.access.AccessDeniedException;
import org.springframework.validation.BindException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingPathVariableException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.DemoModeException;
@@ -59,6 +61,28 @@ public class GlobalExceptionHandler
return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
}
+ /**
+ * 请求路径中缺少必需的路径变量
+ */
+ @ExceptionHandler(MissingPathVariableException.class)
+ public AjaxResult handleMissingPathVariableException(MissingPathVariableException e, HttpServletRequest request)
+ {
+ String requestURI = request.getRequestURI();
+ log.error("请求路径中缺少必需的路径变量'{}',发生系统异常.", requestURI, e);
+ return AjaxResult.error(String.format("请求路径中缺少必需的路径变量[%s]", e.getVariableName()));
+ }
+
+ /**
+ * 请求参数类型不匹配
+ */
+ @ExceptionHandler(MethodArgumentTypeMismatchException.class)
+ public AjaxResult handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e, HttpServletRequest request)
+ {
+ String requestURI = request.getRequestURI();
+ log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
+ return AjaxResult.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), e.getValue()));
+ }
+
/**
* 拦截未知的运行时异常
*/
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java
index 8fed7fbd..5043e397 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java
@@ -62,7 +62,7 @@ public class PermissionService
/**
* 验证用户是否具有以下任意一个权限
*
- * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
+ * @param permissions 以 PERMISSION_DELIMETER 为分隔符的权限列表
* @return 用户是否具有以下任意一个权限
*/
public boolean hasAnyPermi(String permissions)
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
index 357e12f2..64007506 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysMenuService;
@@ -62,7 +63,7 @@ public class SysPermissionService
else
{
List roles = user.getRoles();
- if (!roles.isEmpty() && roles.size() > 1)
+ if (!CollectionUtils.isEmpty(roles))
{
// 多角色设置permissions属性,以便数据权限匹配权限
for (SysRole role : roles)
diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml
index 094e33d8..cea4f67e 100644
--- a/ruoyi-generator/pom.xml
+++ b/ruoyi-generator/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml
index 4544c8c2..1aeec14e 100644
--- a/ruoyi-generator/src/main/resources/generator.yml
+++ b/ruoyi-generator/src/main/resources/generator.yml
@@ -1,5 +1,5 @@
# 代码生成
-gen:
+gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
index 46cf39b0..b62365a9 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -28,23 +28,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
-
+
-
+
-
+
insert into gen_table_column (
table_id,
@@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sysdate()
)
-
+
update gen_table_column
@@ -111,14 +111,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from gen_table_column where table_id in
+ delete from gen_table_column where table_id in
#{tableId}
-
+
- delete from gen_table_column where column_id in
+ delete from gen_table_column where column_id in
#{item.columnId}
diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml
index 6b8de13e..b1c7b3ea 100644
--- a/ruoyi-quartz/pom.xml
+++ b/ruoyi-quartz/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
index 57808fa2..9a90d7b1 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
@@ -34,7 +34,7 @@ public class JobInvokeUtil
}
else
{
- Object bean = Class.forName(beanName).newInstance();
+ Object bean = Class.forName(beanName).getDeclaredConstructor().newInstance();
invokeMethod(bean, methodName, methodParams);
}
}
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index 0188c46d..18690681 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -5,7 +5,7 @@
ruoyi
com.ruoyi
- 3.8.5
+ 3.8.6
4.0.0
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index 41def8be..09f3fb93 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -501,17 +501,18 @@ public class SysUserServiceImpl implements ISysUserService
BeanValidators.validateWithException(validator, user);
user.setPassword(SecurityUtils.encryptPassword(password));
user.setCreateBy(operName);
- this.insertUser(user);
+ userMapper.insertUser(user);
successNum++;
successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 导入成功");
}
else if (isUpdateSupport)
{
BeanValidators.validateWithException(validator, user);
- checkUserAllowed(user);
- checkUserDataScope(user.getUserId());
+ checkUserAllowed(u);
+ checkUserDataScope(u.getUserId());
+ user.setUserId(u.getUserId());
user.setUpdateBy(operName);
- this.updateUser(user);
+ userMapper.updateUser(user);
successNum++;
successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 更新成功");
}
diff --git a/ruoyi-ui/src/assets/images/pay.png b/ruoyi-ui/src/assets/images/pay.png
new file mode 100644
index 00000000..bb8b9672
Binary files /dev/null and b/ruoyi-ui/src/assets/images/pay.png differ
diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss
index 43d5f9a9..9f390460 100644
--- a/ruoyi-ui/src/assets/styles/sidebar.scss
+++ b/ruoyi-ui/src/assets/styles/sidebar.scss
@@ -1,7 +1,7 @@
#app {
.main-container {
- min-height: 100%;
+ height: 100%;
transition: margin-left .28s;
margin-left: $base-sidebar-width;
position: relative;
diff --git a/ruoyi-ui/src/components/DictTag/index.vue b/ruoyi-ui/src/components/DictTag/index.vue
index 4c196c48..a0fd66f3 100644
--- a/ruoyi-ui/src/components/DictTag/index.vue
+++ b/ruoyi-ui/src/components/DictTag/index.vue
@@ -7,7 +7,7 @@
:key="item.value"
:index="index"
:class="item.raw.cssClass"
- >{{ item.label }}{{ item.label + " " }}
- {{ item.label }}
+ {{ item.label + " " }}
+
+ {{ unmatchArray | handleArray }}
+
@@ -33,20 +36,57 @@ export default {
default: null,
},
value: [Number, String, Array],
+ // 当未找到匹配的数据时,显示value
+ showValue: {
+ type: Boolean,
+ default: true,
+ }
+ },
+ data() {
+ return {
+ unmatchArray: [], // 记录未匹配的项
+ }
},
computed: {
values() {
- if (this.value !== null && typeof this.value !== 'undefined') {
+ if (this.value !== null && typeof this.value !== "undefined") {
return Array.isArray(this.value) ? this.value : [String(this.value)];
} else {
return [];
}
},
+ unmatch() {
+ this.unmatchArray = [];
+ if (this.value !== null && typeof this.value !== "undefined") {
+ // 传入值为非数组
+ if (!Array.isArray(this.value)) {
+ if (this.options.some((v) => v.value == this.value)) return false;
+ this.unmatchArray.push(this.value);
+ return true;
+ }
+ // 传入值为Array
+ this.value.forEach((item) => {
+ if (!this.options.some((v) => v.value == item))
+ this.unmatchArray.push(item);
+ });
+ return true;
+ }
+ // 没有value不显示
+ return false;
+ },
},
+ filters: {
+ handleArray(array) {
+ if (array.length === 0) return "";
+ return array.reduce((pre, cur) => {
+ return pre + " " + cur;
+ })
+ }
+ }
};
\ No newline at end of file
+
diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue
index a7512b2d..8dadc028 100644
--- a/ruoyi-ui/src/components/IconSelect/index.vue
+++ b/ruoyi-ui/src/components/IconSelect/index.vue
@@ -1,68 +1,104 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue
index 5f0edbef..9fb8dd81 100644
--- a/ruoyi-ui/src/components/TopNav/index.vue
+++ b/ruoyi-ui/src/components/TopNav/index.vue
@@ -127,7 +127,13 @@ export default {
window.open(key, "_blank");
} else if (!route || !route.children) {
// 没有子路由路径内部打开
- this.$router.push({ path: key });
+ const routeMenu = this.childrenMenus.find(item => item.path === key);
+ if (routeMenu && routeMenu.query) {
+ let query = JSON.parse(routeMenu.query);
+ this.$router.push({ path: key, query: query });
+ } else {
+ this.$router.push({ path: key });
+ }
this.$store.dispatch('app/toggleSideBarHide', true);
} else {
// 显示左侧联动菜单
diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue
index b7a87ae8..a25c5625 100644
--- a/ruoyi-ui/src/layout/components/AppMain.vue
+++ b/ruoyi-ui/src/layout/components/AppMain.vue
@@ -50,3 +50,26 @@ export default {
}
}
+
+
diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
index c8401c51..35cc5282 100644
--- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
+++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
@@ -35,7 +35,7 @@ export default {
},
data() {
return {
- title: '若依管理系统',
+ title: process.env.VUE_APP_TITLE,
logo: logoImg
}
}
diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
index c110bf12..bb753a12 100644
--- a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
@@ -1,94 +1,94 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index d69f7ae2..1fc23235 100644
--- a/ruoyi-ui/src/layout/components/TagsView/index.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/index.vue
@@ -182,7 +182,7 @@ export default {
})
},
closeOthersTags() {
- this.$router.push(this.selectedTag).catch(()=>{});
+ this.$router.push(this.selectedTag.fullPath).catch(()=>{});
this.$tab.closeOtherPage(this.selectedTag).then(() => {
this.moveToCurrentTag()
})
diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue
index ab2be3c4..dba4393d 100644
--- a/ruoyi-ui/src/layout/index.vue
+++ b/ruoyi-ui/src/layout/index.vue
@@ -1,19 +1,17 @@
-
-
-
-
@@ -74,14 +72,6 @@ export default {
height: 100%;
width: 100%;
- .el-scrollbar{
- height: 100%;
- }
-
- ::v-deep .el-scrollbar__wrap {
- overflow-x: hidden;
- }
-
&.mobile.openSidebar {
position: fixed;
top: 0;
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 9ca9e269..2fff7861 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -244,9 +244,15 @@ export const dynamicRoutes = [
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
+let routerReplace = Router.prototype.replace;
+// push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err)
}
+// replace
+Router.prototype.replace = function push(location) {
+ return routerReplace.call(this, location).catch(err => err)
+}
export default new Router({
mode: 'history', // 去掉url中的#
diff --git a/ruoyi-ui/src/views/monitor/cache/list.vue b/ruoyi-ui/src/views/monitor/cache/list.vue
index db092fe6..b808c38a 100644
--- a/ruoyi-ui/src/views/monitor/cache/list.vue
+++ b/ruoyi-ui/src/views/monitor/cache/list.vue
@@ -187,7 +187,7 @@ export default {
/** 清理指定名称缓存 */
handleClearCacheName(row) {
clearCacheName(row.cacheName).then(response => {
- this.$modal.msgSuccess("清理缓存名称[" + this.nowCacheName + "]成功");
+ this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
this.getCacheKeys();
});
},
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index 57b56e55..2a83f9e9 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -77,7 +77,7 @@
-
-
+
diff --git a/sql/ry_20230223.sql b/sql/ry_20230706.sql
similarity index 98%
rename from sql/ry_20230223.sql
rename to sql/ry_20230706.sql
index 45c2ebb7..e4f4f69b 100644
--- a/sql/ry_20230223.sql
+++ b/sql/ry_20230706.sql
@@ -674,7 +674,7 @@ create table gen_table (
drop table if exists gen_table_column;
create table gen_table_column (
column_id bigint(20) not null auto_increment comment '编号',
- table_id varchar(64) comment '归属表编号',
+ table_id bigint(20) comment '归属表编号',
column_name varchar(200) comment '列名称',
column_comment varchar(500) comment '列描述',
column_type varchar(100) comment '列类型',