From 212e3b49774949f31c2ac0b832b811d54ffd1be5 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Jul 2024 12:58:28 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=8D=87=E7=BA=A7axios=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC0.28.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 12a45379..7e438cc2 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", - "axios": "0.24.0", + "axios": "0.28.1", "clipboard": "2.0.8", "core-js": "3.37.1", "echarts": "5.4.0", From 2feae7619f75421d5b026cbb878420663c1a81b8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Jul 2024 16:08:30 +0800 Subject: [PATCH 02/18] avatar add headers --- ruoyi-ui/src/api/system/user.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index 9b949e91..6d98f631 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -105,6 +105,7 @@ export function uploadAvatar(data) { return request({ url: '/system/user/profile/avatar', method: 'post', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, data: data }) } From f812e99a0dc98cce48418bc1c989dbcaf616cc69 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 8 Jul 2024 16:38:34 +0800 Subject: [PATCH 03/18] remove sub resultType --- ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm index 3d2ce77e..84ce337b 100644 --- a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm @@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #if($table.sub) - select#foreach ($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end from ${subTableName} where ${subTableFkName} = #{${subTableFkName}} From 3ef6000794dbd50112a7c9ae7ff53dae168c992e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 8 Jul 2024 16:45:36 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/generator/GenTableMapper.xml | 8 ++++---- .../src/main/resources/mapper/quartz/SysJobLogMapper.xml | 4 ++-- .../src/main/resources/mapper/system/SysConfigMapper.xml | 4 ++-- .../main/resources/mapper/system/SysDictTypeMapper.xml | 4 ++-- .../src/main/resources/mapper/system/SysRoleMapper.xml | 4 ++-- .../src/main/resources/mapper/system/SysUserMapper.xml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml index 5a9e547b..8d7dd8bf 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -68,10 +68,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) - AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') @@ -88,10 +88,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) - AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') order by create_time desc diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml index 05a19084..5ed72647 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml @@ -36,10 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND invoke_target like concat('%', #{invokeTarget}, '%') - and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') order by create_time desc diff --git a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml index c2116927..f4295aa0 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml @@ -51,10 +51,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND config_key like concat('%', #{configKey}, '%') - and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml index 2b44b2ee..554db544 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -33,10 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND dict_type like concat('%', #{dictType}, '%') - and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index ab601e4b..a3b780ff 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -46,10 +46,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND r.role_key like concat('%', #{roleKey}, '%') - and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + and date_format(r.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + and date_format(r.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') ${params.dataScope} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index eda0be22..5814cd35 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -73,10 +73,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND u.phonenumber like concat('%', #{phonenumber}, '%') - AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND date_format(u.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') - AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) From ad86486285cb865f124e5c83cdaf8fa8edc65408 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 30 Aug 2024 21:45:16 +0800 Subject: [PATCH 05/18] update sqlkeyword --- .../src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9f40118c..e345cb45 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 @@ -13,7 +13,7 @@ public class SqlUtil /** * 定义常用的 sql关键字 */ - public static String SQL_REGEX = "and |extractvalue|updatexml|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |or |+|user()"; + public static String SQL_REGEX = "and |extractvalue|updatexml|sleep|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |or |union |like |+|/*|user()"; /** * 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序) From 8a0a3a03fe927a1b6f29c0cd0d168cf7724c3f18 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 30 Aug 2024 21:46:03 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E5=8D=87=E7=BA=A7oshi=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC6.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 05478cd6..7605f0b2 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 2.3.3 1.4.7 2.0.43 - 6.6.1 + 6.6.3 2.13.0 4.1.2 2.3 From 22a795d04187ef49a467ce92c8d5b766a339074d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 8 Sep 2024 10:29:41 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/system/SysRoleController.java | 2 +- .../main/java/com/ruoyi/framework/config/ResourcesConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index ebe7460e..dfbf256b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -132,8 +132,8 @@ public class SysRoleController extends BaseController LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { - loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); + loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); tokenService.setLoginUser(loginUser); } return success(); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index 4e067a7b..b6afb5db 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -36,7 +36,7 @@ public class ResourcesConfig implements WebMvcConfigurer /** swagger配置 */ registry.addResourceHandler("/swagger-ui/**") .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") - .setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());; + .setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic()); } /** From 5fad997d38f58f689f6a9c1c174c3785abccdfe9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 21 Sep 2024 11:28:52 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E6=9D=83=E9=99=90=E4=B8=8D=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98(IAA8ZX)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/constant/UserConstants.java | 3 +++ .../com/ruoyi/framework/aspectj/DataScopeAspect.java | 8 ++++---- .../framework/web/service/SysPermissionService.java | 11 ++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java index b09b6f3d..f2b5ab58 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java @@ -21,6 +21,9 @@ public class UserConstants /** 用户封禁状态 */ public static final String USER_DISABLE = "1"; + /** 角色正常状态 */ + public static final String ROLE_NORMAL = "0"; + /** 角色封禁状态 */ public static final String ROLE_DISABLE = "1"; diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 1543ec5b..719c3711 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -7,6 +7,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.springframework.stereotype.Component; import com.ruoyi.common.annotation.DataScope; +import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; @@ -73,8 +74,7 @@ public class DataScopeAspect if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) { String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext()); - dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), - controllerDataScope.userAlias(), permission); + dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias(), permission); } } } @@ -94,7 +94,7 @@ public class DataScopeAspect List conditions = new ArrayList(); List scopeCustomIds = new ArrayList(); user.getRoles().forEach(role -> { - if (DATA_SCOPE_CUSTOM.equals(role.getDataScope()) && StringUtils.containsAny(role.getPermissions(), Convert.toStrArray(permission))) + if (DATA_SCOPE_CUSTOM.equals(role.getDataScope()) && StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && StringUtils.containsAny(role.getPermissions(), Convert.toStrArray(permission))) { scopeCustomIds.add(Convert.toStr(role.getRoleId())); } @@ -103,7 +103,7 @@ public class DataScopeAspect for (SysRole role : user.getRoles()) { String dataScope = role.getDataScope(); - if (conditions.contains(dataScope)) + if (conditions.contains(dataScope) || StringUtils.equals(role.getStatus(), UserConstants.ROLE_DISABLE)) { continue; } 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 64007506..dbfccde2 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 @@ -6,8 +6,10 @@ 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.constant.UserConstants; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.service.ISysMenuService; import com.ruoyi.system.service.ISysRoleService; @@ -68,9 +70,12 @@ public class SysPermissionService // 多角色设置permissions属性,以便数据权限匹配权限 for (SysRole role : roles) { - Set rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId()); - role.setPermissions(rolePerms); - perms.addAll(rolePerms); + if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL)) + { + Set rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId()); + role.setPermissions(rolePerms); + perms.addAll(rolePerms); + } } } else From 78bb30bb5fdd54eb34d88e3fd24098aeed29a7cc Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 27 Sep 2024 16:15:17 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=B8=8A=E7=BA=A7=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98(I9CTIJ)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/generator/domain/GenTable.java | 6 +++--- .../com/ruoyi/generator/service/GenTableServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java index c3af38f0..2777d419 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java @@ -93,7 +93,7 @@ public class GenTable extends BaseEntity private String treeName; /** 上级菜单ID字段 */ - private String parentMenuId; + private Long parentMenuId; /** 上级菜单名称字段 */ private String parentMenuName; @@ -318,12 +318,12 @@ public class GenTable extends BaseEntity this.treeName = treeName; } - public String getParentMenuId() + public Long getParentMenuId() { return parentMenuId; } - public void setParentMenuId(String parentMenuId) + public void setParentMenuId(Long parentMenuId) { this.parentMenuId = parentMenuId; } diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java index 18231ebe..99a837aa 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java @@ -501,7 +501,7 @@ public class GenTableServiceImpl implements IGenTableService String treeCode = paramsObj.getString(GenConstants.TREE_CODE); String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE); String treeName = paramsObj.getString(GenConstants.TREE_NAME); - String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID); + Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID); String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME); genTable.setTreeCode(treeCode); From dc9f3ee72256c7ca1413d6f5489e4cb5d4a7eb7b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 15 Oct 2024 16:18:02 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E5=8D=87=E7=BA=A7quill=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC2.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/components/Editor/index.vue | 4 ++-- ruoyi-ui/vue.config.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 7e438cc2..81904c39 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -49,7 +49,7 @@ "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "nprogress": "0.2.0", - "quill": "1.3.7", + "quill": "2.0.2", "screenfull": "5.0.2", "sortablejs": "1.10.2", "vue": "2.6.12", diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index 8981d763..9323e538 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -108,7 +108,7 @@ export default { if (val !== this.currentValue) { this.currentValue = val === null ? "" : val; if (this.Quill) { - this.Quill.pasteHTML(this.currentValue); + this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue); } } }, @@ -136,7 +136,7 @@ export default { } }); } - this.Quill.pasteHTML(this.currentValue); + this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue); this.Quill.on("text-change", (delta, oldDelta, source) => { const html = this.$refs.editor.children[0].innerHTML; const text = this.Quill.getText(); diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 1766cf87..fa67f51b 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -27,6 +27,7 @@ module.exports = { lintOnSave: process.env.NODE_ENV === 'development', // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, + transpileDependencies: ['quill'], // webpack-dev-server 相关配置 devServer: { host: '0.0.0.0', From 08a5deb285eac6b09e5649d068990a889e3f0174 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Oct 2024 12:42:24 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=882.0.53?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7605f0b2..5994ea89 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.0.0 2.3.3 1.4.7 - 2.0.43 + 2.0.53 6.6.3 2.13.0 4.1.2 From adb8d519324ae11faa8ee0d74a60e62cdfa210c8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Oct 2024 12:42:40 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95DELETE=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0(IA?= =?UTF-8?q?MV6F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/framework/aspectj/LogAspect.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index bd220525..ca9a10f7 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -172,8 +172,7 @@ public class LogAspect { Map paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); String requestMethod = operLog.getRequestMethod(); - if (StringUtils.isEmpty(paramsMap) - && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) + if (StringUtils.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) { String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); operLog.setOperParam(StringUtils.substring(params, 0, 2000)); From 4358621473c730f60642b0a0ba88740dc56aa0c4 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Oct 2024 10:24:45 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8E=E5=90=8C=E6=AD=A5=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/SysLoginController.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index dab2bf87..e575d287 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -12,9 +12,11 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginBody; +import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.web.service.SysLoginService; import com.ruoyi.framework.web.service.SysPermissionService; +import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.service.ISysMenuService; /** @@ -34,6 +36,9 @@ public class SysLoginController @Autowired private SysPermissionService permissionService; + @Autowired + private TokenService tokenService; + /** * 登录方法 * @@ -59,11 +64,17 @@ public class SysLoginController @GetMapping("getInfo") public AjaxResult getInfo() { - SysUser user = SecurityUtils.getLoginUser().getUser(); + LoginUser loginUser = SecurityUtils.getLoginUser(); + SysUser user = loginUser.getUser(); // 角色集合 Set roles = permissionService.getRolePermission(user); // 权限集合 Set permissions = permissionService.getMenuPermission(user); + if (!loginUser.getPermissions().equals(permissions)) + { + loginUser.setPermissions(permissions); + tokenService.refreshToken(loginUser); + } AjaxResult ajax = AjaxResult.success(); ajax.put("user", user); ajax.put("roles", roles); From 5b959b32d7058f0dfe19c430eb5985f195bd7c55 Mon Sep 17 00:00:00 2001 From: AZP <2198774759@qq.com> Date: Mon, 21 Oct 2024 03:39:18 +0000 Subject: [PATCH 14/18] =?UTF-8?q?update=20ruoyi-ui/src/components/ImageUpl?= =?UTF-8?q?oad/index.vue.=20=E3=80=90fix=E3=80=91=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=89=8D=E7=AB=AF=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=A6=82=E6=9E=9C=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E6=90=BA=E5=B8=A6=E5=9F=9F=E5=90=8D=E5=B0=B1?= =?UTF-8?q?=E6=97=A0=E9=9C=80=E5=A2=9E=E5=8A=A0=E5=89=8D=E7=BC=80=E5=9F=9F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AZP <2198774759@qq.com> --- ruoyi-ui/src/components/ImageUpload/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index b5013756..4bb29837 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -44,6 +44,7 @@