From 8704cae18226b44857e5f64c13c418dbd1147988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 1 Dec 2023 14:56:17 +0800 Subject: [PATCH 01/32] =?UTF-8?q?add=20=E6=96=B0=E5=A2=9E=20RedisUtils.set?= =?UTF-8?q?ObjectIfExists=20=E5=A6=82=E6=9E=9C=E5=AD=98=E5=9C=A8=E5=88=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/common/redis/utils/RedisUtils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java index 9f59f69f1..ee58411f7 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java @@ -141,6 +141,18 @@ public class RedisUtils { return bucket.setIfAbsent(value, duration); } + /** + * 如果存在则设置 并返回 true 如果存在则返回 false + * + * @param key 缓存的键值 + * @param value 缓存的值 + * @return set成功或失败 + */ + public static boolean setObjectIfExists(final String key, final T value, final Duration duration) { + RBucket bucket = CLIENT.getBucket(key); + return bucket.setIfExists(value, duration); + } + /** * 注册对象监听器 *

From 677fe7e2a5be46d4f3e29a86783522ab1c028c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 1 Dec 2023 14:58:37 +0800 Subject: [PATCH 02/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=87=8F?= =?UTF-8?q?=E5=B0=91=20PlusSaTokenDao=20=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../satoken/core/dao/PlusSaTokenDao.java | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java index 8d2aac965..d88596228 100644 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java +++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java @@ -45,12 +45,9 @@ public class PlusSaTokenDao implements SaTokenDao { */ @Override public void update(String key, String value) { - long expire = getTimeout(key); - // -2 = 无此键 - if (expire == NOT_VALUE_EXPIRE) { - return; + if (RedisUtils.hasKey(key)) { + RedisUtils.setCacheObject(key, value, true); } - this.set(key, value, expire); } /** @@ -75,17 +72,6 @@ public class PlusSaTokenDao implements SaTokenDao { */ @Override public void updateTimeout(String key, long timeout) { - // 判断是否想要设置为永久 - if (timeout == NEVER_EXPIRE) { - long expire = getTimeout(key); - if (expire == NEVER_EXPIRE) { - // 如果其已经被设置为永久,则不作任何处理 - } else { - // 如果尚未被设置为永久,那么再次set一次 - this.set(key, this.get(key), timeout); - } - return; - } RedisUtils.expire(key, Duration.ofSeconds(timeout)); } @@ -119,12 +105,9 @@ public class PlusSaTokenDao implements SaTokenDao { */ @Override public void updateObject(String key, Object object) { - long expire = getObjectTimeout(key); - // -2 = 无此键 - if (expire == NOT_VALUE_EXPIRE) { - return; + if (RedisUtils.hasKey(key)) { + RedisUtils.setCacheObject(key, object, true); } - this.setObject(key, object, expire); } /** @@ -149,17 +132,6 @@ public class PlusSaTokenDao implements SaTokenDao { */ @Override public void updateObjectTimeout(String key, long timeout) { - // 判断是否想要设置为永久 - if (timeout == NEVER_EXPIRE) { - long expire = getObjectTimeout(key); - if (expire == NEVER_EXPIRE) { - // 如果其已经被设置为永久,则不作任何处理 - } else { - // 如果尚未被设置为永久,那么再次set一次 - this.setObject(key, this.getObject(key), timeout); - } - return; - } RedisUtils.expire(key, Duration.ofSeconds(timeout)); } From 1999000322a640c763c794a811da5be566eaa824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 4 Dec 2023 10:56:53 +0800 Subject: [PATCH 03/32] update justauth 1.16.5 => 1.16.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f354d858..83eda6cea 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 0.2.0 1.18.30 1.76 - 1.16.5 + 1.16.6 2.7.0 From a1adfa2e93de3365d632c6b54f0b7dce4d8483aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 4 Dec 2023 17:05:50 +0800 Subject: [PATCH 04/32] update transmittable-thread-local 2.14.2 => 2.14.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83eda6cea..423e2c9cd 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 3.24.3 2.2.5 4.2.0 - 2.14.2 + 2.14.4 4.3.3 1.3.5 0.2.0 From 8ed5c75c6ae8f59652a2caad2a669ec2fbe56718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 5 Dec 2023 12:56:33 +0800 Subject: [PATCH 05/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20hikaricp=20=E5=AE=98=E6=96=B9=E4=B8=8D=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E4=BD=BF=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=20jdbc4?= =?UTF-8?q?=20=E5=8D=8F=E8=AE=AE=E8=87=AA=E5=B8=A6=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-dev.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index b168542db..584e6104b 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -60,8 +60,6 @@ spring: # url: jdbc:oracle:thin:@//localhost:1521/XE # username: ROOT # password: root -# hikari: -# connectionTestQuery: SELECT 1 FROM DUAL # postgres: # type: ${spring.datasource.type} # driverClassName: org.postgresql.Driver @@ -87,8 +85,6 @@ spring: idleTimeout: 600000 # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 maxLifetime: 1800000 - # 连接测试query(配置检测连接是否有效) - connectionTestQuery: SELECT 1 # 多久检查一次连接的活性 keepaliveTime: 30000 From 5d97541b8f82f02bd2d9cb293702e0c66574d0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 5 Dec 2023 12:56:58 +0800 Subject: [PATCH 06/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20hikaricp=20=E5=AE=98=E6=96=B9=E4=B8=8D=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E4=BD=BF=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=20jdbc4?= =?UTF-8?q?=20=E5=8D=8F=E8=AE=AE=E8=87=AA=E5=B8=A6=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-prod.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index 148b50e98..44437791f 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -63,8 +63,6 @@ spring: # url: jdbc:oracle:thin:@//localhost:1521/XE # username: ROOT # password: root -# hikari: -# connectionTestQuery: SELECT 1 FROM DUAL # postgres: # type: ${spring.datasource.type} # driverClassName: org.postgresql.Driver @@ -90,8 +88,6 @@ spring: idleTimeout: 600000 # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 maxLifetime: 1800000 - # 连接测试query(配置检测连接是否有效) - connectionTestQuery: SELECT 1 # 多久检查一次连接的活性 keepaliveTime: 30000 From affbce1957c1bcce089d1d1e535d9ad0ad6d880b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 5 Dec 2023 22:46:59 +0800 Subject: [PATCH 07/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=BC=80?= =?UTF-8?q?=E5=90=AF=20redisson=20=E8=84=9A=E6=9C=AC=E7=BC=93=E5=AD=98=20?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E7=BD=91=E7=BB=9C=E4=BC=A0=E8=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/dromara/common/redis/config/RedisConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/config/RedisConfig.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/config/RedisConfig.java index dcba5738a..7999f2b34 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/config/RedisConfig.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/config/RedisConfig.java @@ -49,6 +49,8 @@ public class RedisConfig { CompositeCodec codec = new CompositeCodec(StringCodec.INSTANCE, jsonCodec, jsonCodec); config.setThreads(redissonProperties.getThreads()) .setNettyThreads(redissonProperties.getNettyThreads()) + // 缓存 Lua 脚本 减少网络传输(redisson 大部分的功能都是基于 Lua 脚本实现) + .setUseScriptCache(true) .setCodec(codec); RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig(); if (ObjectUtil.isNotNull(singleServerConfig)) { From 4cefcf6ada94919053e66d1756af33fff0dc1c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 7 Dec 2023 10:33:55 +0800 Subject: [PATCH 08/32] update easyexcel 3.3.2 => 3.3.3 update springboot-admin 3.1.7 => 3.1.8 update aws-java-sdk-s3 1.12.540 => 1.12.600 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 423e2c9cd..13246136b 100644 --- a/pom.xml +++ b/pom.xml @@ -22,14 +22,14 @@ 2.2.0 0.15.0 5.2.3 - 3.3.2 + 3.3.3 2.3 1.37.0 3.5.4 3.9.1 5.8.22 4.10.0 - 3.1.7 + 3.1.8 3.24.3 2.2.5 4.2.0 @@ -44,7 +44,7 @@ 2.7.0 - 1.12.540 + 1.12.600 2.2.0 From e509d95af994e0aaca356f066e31a59b08bd2e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 7 Dec 2023 14:52:06 +0800 Subject: [PATCH 09/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E7=BB=86?= =?UTF-8?q?=E5=8C=96oss=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysOssConfigController.java | 12 ++++++------ script/sql/oracle/oracle_ry_vue_5.X.sql | 6 ++++-- script/sql/postgres/postgres_ry_vue_5.X.sql | 6 ++++-- script/sql/ry_vue_5.X.sql | 9 ++++++--- script/sql/sqlserver/sqlserver_ry_vue_5.X.sql | 8 ++++++-- script/sql/update/oracle/update_5.1.1-5.1.2.sql | 5 +++++ script/sql/update/postgres/update_5.1.1-5.1.2.sql | 6 ++++++ script/sql/update/sqlserver/update_5.1.1-5.1.2.sql | 10 ++++++++++ script/sql/update/update_5.1.1-5.1.2.sql | 6 ++++++ 9 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 script/sql/update/oracle/update_5.1.1-5.1.2.sql create mode 100644 script/sql/update/postgres/update_5.1.1-5.1.2.sql create mode 100644 script/sql/update/sqlserver/update_5.1.1-5.1.2.sql create mode 100644 script/sql/update/update_5.1.1-5.1.2.sql diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysOssConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysOssConfigController.java index 0fe712267..24ddaff29 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysOssConfigController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysOssConfigController.java @@ -40,7 +40,7 @@ public class SysOssConfigController extends BaseController { /** * 查询对象存储配置列表 */ - @SaCheckPermission("system:oss:list") + @SaCheckPermission("system:ossConfig:list") @GetMapping("/list") public TableDataInfo list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) { return ossConfigService.queryPageList(bo, pageQuery); @@ -51,7 +51,7 @@ public class SysOssConfigController extends BaseController { * * @param ossConfigId OSS配置ID */ - @SaCheckPermission("system:oss:query") + @SaCheckPermission("system:ossConfig:list") @GetMapping("/{ossConfigId}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long ossConfigId) { @@ -61,7 +61,7 @@ public class SysOssConfigController extends BaseController { /** * 新增对象存储配置 */ - @SaCheckPermission("system:oss:add") + @SaCheckPermission("system:ossConfig:add") @Log(title = "对象存储配置", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() @@ -72,7 +72,7 @@ public class SysOssConfigController extends BaseController { /** * 修改对象存储配置 */ - @SaCheckPermission("system:oss:edit") + @SaCheckPermission("system:ossConfig:edit") @Log(title = "对象存储配置", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() @@ -85,7 +85,7 @@ public class SysOssConfigController extends BaseController { * * @param ossConfigIds OSS配置ID串 */ - @SaCheckPermission("system:oss:remove") + @SaCheckPermission("system:ossConfig:remove") @Log(title = "对象存储配置", businessType = BusinessType.DELETE) @DeleteMapping("/{ossConfigIds}") public R remove(@NotEmpty(message = "主键不能为空") @@ -96,7 +96,7 @@ public class SysOssConfigController extends BaseController { /** * 状态修改 */ - @SaCheckPermission("system:oss:edit") + @SaCheckPermission("system:ossConfig:edit") @Log(title = "对象存储状态修改", businessType = BusinessType.UPDATE) @PutMapping("/changeStatus") public R changeStatus(@RequestBody SysOssConfigBo bo) { diff --git a/script/sql/oracle/oracle_ry_vue_5.X.sql b/script/sql/oracle/oracle_ry_vue_5.X.sql index 1100fa92e..ef45c5f8e 100644 --- a/script/sql/oracle/oracle_ry_vue_5.X.sql +++ b/script/sql/oracle/oracle_ry_vue_5.X.sql @@ -522,8 +522,10 @@ insert into sys_menu values('1600', '文件查询', '118', '1', '#', '', '', 1, insert into sys_menu values('1601', '文件上传', '118', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, sysdate, null, null, ''); insert into sys_menu values('1602', '文件下载', '118', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, sysdate, null, null, ''); insert into sys_menu values('1603', '文件删除', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1604', '配置添加', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1605', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate, null, null, ''); -- 租户管理相关按钮 insert into sys_menu values('1606', '租户查询', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, sysdate, null, null, ''); insert into sys_menu values('1607', '租户新增', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, sysdate, null, null, ''); diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql index 48860dc7c..a6d6f1a03 100644 --- a/script/sql/postgres/postgres_ry_vue_5.X.sql +++ b/script/sql/postgres/postgres_ry_vue_5.X.sql @@ -532,8 +532,10 @@ insert into sys_menu values('1600', '文件查询', '118', '1', '#', '', '', '1' insert into sys_menu values('1601', '文件上传', '118', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:upload', '#', 103, 1, now(), null, null, ''); insert into sys_menu values('1602', '文件下载', '118', '3', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:download', '#', 103, 1, now(), null, null, ''); insert into sys_menu values('1603', '文件删除', '118', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:remove', '#', 103, 1, now(), null, null, ''); -insert into sys_menu values('1604', '配置添加', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:add', '#', 103, 1, now(), null, null, ''); -insert into sys_menu values('1605', '配置编辑', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:edit', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, now(), null, null, ''); -- 租户管理相关按钮 insert into sys_menu values('1606', '租户查询', '121', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:query', '#', 103, 1, now(), null, null, ''); insert into sys_menu values('1607', '租户新增', '121', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:add', '#', 103, 1, now(), null, null, ''); diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql index 09f15ff26..ea365bd01 100644 --- a/script/sql/ry_vue_5.X.sql +++ b/script/sql/ry_vue_5.X.sql @@ -285,7 +285,7 @@ insert into sys_menu values('113', '缓存监控', '2', '5', 'cache', insert into sys_menu values('114', '表单构建', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 103, 1, sysdate(), null, null, '表单构建菜单'); insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代码生成菜单'); insert into sys_menu values('121', '租户管理', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate(), null, null, '租户管理菜单'); -insert into sys_menu values('122', '租户套餐管理', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, '租户套餐管理菜单'); +insert into sys_menu values('122', '租户套餐管理', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, '租户套餐管理菜单'); insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 103, 1, sysdate(), null, null, '客户端管理菜单'); -- springboot-admin监控 @@ -370,8 +370,11 @@ insert into sys_menu values('1600', '文件查询', '118', '1', '#', '', '', 1, insert into sys_menu values('1601', '文件上传', '118', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1602', '文件下载', '118', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1603', '文件删除', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1604', '配置添加', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1605', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate(), null, null, ''); + -- 租户管理相关按钮 insert into sys_menu values ('1606', '租户查询', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values ('1607', '租户新增', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, sysdate(), null, null, ''); diff --git a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql index 2045c587e..a27ac5def 100644 --- a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql +++ b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql @@ -1808,9 +1808,13 @@ INSERT sys_menu VALUES (1602, N'文件下载', 118, 3, N'#', N'', N'', 1, 0, N'F GO INSERT sys_menu VALUES (1603, N'文件删除', 118, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); GO -INSERT sys_menu VALUES (1604, N'配置添加', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:add', N'#', 103, 1, getdate(), NULL, NULL, N''); +INSERT sys_menu VALUES (1620, N'配置列表', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:list', N'#', 103, 1, getdate(), NULL, NULL, N''); GO -INSERT sys_menu VALUES (1605, N'配置编辑', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); +INSERT sys_menu VALUES (1621, N'配置添加', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:add', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO +INSERT sys_menu VALUES (1622, N'配置编辑', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO +INSERT sys_menu VALUES (1623, N'配置删除', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); GO -- 租户管理相关按钮 INSERT sys_menu VALUES (1606, N'租户查询', 121, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:query', N'#', 103, 1, getdate(), NULL, NULL, N''); diff --git a/script/sql/update/oracle/update_5.1.1-5.1.2.sql b/script/sql/update/oracle/update_5.1.1-5.1.2.sql new file mode 100644 index 000000000..dcb5cbb1c --- /dev/null +++ b/script/sql/update/oracle/update_5.1.1-5.1.2.sql @@ -0,0 +1,5 @@ +delete from sys_menu where menu_id in (1604, 1605); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate, null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate, null, null, ''); diff --git a/script/sql/update/postgres/update_5.1.1-5.1.2.sql b/script/sql/update/postgres/update_5.1.1-5.1.2.sql new file mode 100644 index 000000000..0e212de70 --- /dev/null +++ b/script/sql/update/postgres/update_5.1.1-5.1.2.sql @@ -0,0 +1,6 @@ +delete from sys_menu where menu_id in (1604, 1605); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, now(), null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, now(), null, null, ''); + diff --git a/script/sql/update/sqlserver/update_5.1.1-5.1.2.sql b/script/sql/update/sqlserver/update_5.1.1-5.1.2.sql new file mode 100644 index 000000000..9133772d1 --- /dev/null +++ b/script/sql/update/sqlserver/update_5.1.1-5.1.2.sql @@ -0,0 +1,10 @@ +DELETE FROM sys_menu WHERE menu_id IN (1604, 1605); +GO +INSERT sys_menu VALUES (1620, N'配置列表', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:list', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO +INSERT sys_menu VALUES (1621, N'配置添加', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:add', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO +INSERT sys_menu VALUES (1622, N'配置编辑', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO +INSERT sys_menu VALUES (1623, N'配置删除', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); +GO diff --git a/script/sql/update/update_5.1.1-5.1.2.sql b/script/sql/update/update_5.1.1-5.1.2.sql new file mode 100644 index 000000000..681394938 --- /dev/null +++ b/script/sql/update/update_5.1.1-5.1.2.sql @@ -0,0 +1,6 @@ +delete from sys_menu where menu_id in (1604, 1605); +insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate(), null, null, ''); + From 860afb8738886b9ae52b2fb95d6ba1b9d26134b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 7 Dec 2023 15:17:48 +0800 Subject: [PATCH 10/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=B0=86?= =?UTF-8?q?=20OSS=E9=85=8D=E7=BD=AE=20=E6=94=B9=E4=B8=BA=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20=E9=99=8D=E4=BD=8E=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=9A=BE=E5=BA=A6=20=E4=BF=9D=E7=95=99sql=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E8=A1=8C=E6=89=A9=E5=B1=95(?= =?UTF-8?q?=E5=B8=B8=E8=A7=84=E9=A1=B9=E7=9B=AE=E7=94=A8=E4=B8=8D=E4=B8=8A?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=86=E5=A4=9A=E7=A7=9F=E6=88=B7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 1 + .../common/core/constant/CacheNames.java | 2 +- .../common/oss/constant/OssConstant.java | 4 ++- .../dromara/system/domain/SysOssConfig.java | 4 +-- .../service/impl/SysOssConfigServiceImpl.java | 28 ++++++------------- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 0ed7ccb67..3f54f649b 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -133,6 +133,7 @@ tenant: - sys_user_post - sys_user_role - sys_client + - sys_oss_config # MyBatisPlus配置 # https://baomidou.com/config/ diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java index 86ab80ed0..e59277aae 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java @@ -58,7 +58,7 @@ public interface CacheNames { /** * OSS配置 */ - String SYS_OSS_CONFIG = "sys_oss_config"; + String SYS_OSS_CONFIG = GlobalConstants.GLOBAL_REDIS_KEY + "sys_oss_config"; /** * 在线用户 diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/constant/OssConstant.java b/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/constant/OssConstant.java index 417f17b81..9d8db9335 100644 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/constant/OssConstant.java +++ b/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/constant/OssConstant.java @@ -1,5 +1,7 @@ package org.dromara.common.oss.constant; +import org.dromara.common.core.constant.GlobalConstants; + import java.util.Arrays; import java.util.List; @@ -13,7 +15,7 @@ public interface OssConstant { /** * 默认配置KEY */ - String DEFAULT_CONFIG_KEY = "sys_oss:default_config"; + String DEFAULT_CONFIG_KEY = GlobalConstants.GLOBAL_REDIS_KEY + "sys_oss:default_config"; /** * 预览列表资源开关Key diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SysOssConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SysOssConfig.java index de99496ec..8a9e25e08 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SysOssConfig.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SysOssConfig.java @@ -2,9 +2,9 @@ package org.dromara.system.domain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import org.dromara.common.tenant.core.TenantEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; /** * 对象存储配置对象 sys_oss_config @@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) @TableName("sys_oss_config") -public class SysOssConfig extends TenantEntity { +public class SysOssConfig extends BaseEntity { /** * 主建 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssConfigServiceImpl.java index df5e23c6c..2ecd59276 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssConfigServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssConfigServiceImpl.java @@ -11,7 +11,6 @@ import lombok.extern.slf4j.Slf4j; import org.dromara.common.core.constant.CacheNames; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StreamUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.json.utils.JsonUtils; import org.dromara.common.mybatis.core.page.PageQuery; @@ -19,8 +18,6 @@ import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.oss.constant.OssConstant; import org.dromara.common.redis.utils.CacheUtils; import org.dromara.common.redis.utils.RedisUtils; -import org.dromara.common.tenant.core.TenantEntity; -import org.dromara.common.tenant.helper.TenantHelper; import org.dromara.system.domain.SysOssConfig; import org.dromara.system.domain.bo.SysOssConfigBo; import org.dromara.system.domain.vo.SysOssConfigVo; @@ -31,7 +28,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Collection; import java.util.List; -import java.util.Map; /** * 对象存储配置Service业务层处理 @@ -52,22 +48,14 @@ public class SysOssConfigServiceImpl implements ISysOssConfigService { */ @Override public void init() { - List list = TenantHelper.ignore(() -> - baseMapper.selectList( - new LambdaQueryWrapper().orderByAsc(TenantEntity::getTenantId)) - ); - Map> map = StreamUtils.groupByKey(list, SysOssConfig::getTenantId); - for (String tenantId : map.keySet()) { - TenantHelper.dynamic(tenantId, () -> { - // 加载OSS初始化配置 - for (SysOssConfig config : map.get(tenantId)) { - String configKey = config.getConfigKey(); - if ("0".equals(config.getStatus())) { - RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); - } - CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); - } - }); + List list = baseMapper.selectList(); + // 加载OSS初始化配置 + for (SysOssConfig config : list) { + String configKey = config.getConfigKey(); + if ("0".equals(config.getStatus())) { + RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); + } + CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); } } From e1390615b78d28da0be205ef17f45e981c041500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 7 Dec 2023 17:35:49 +0800 Subject: [PATCH 11/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20sms?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20=E9=A2=84=E7=95=99=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sConfig.java => SmsAutoConfiguration.java} | 5 ++--- .../sms/config/properties/SmsProperties.java | 19 ------------------- 2 files changed, 2 insertions(+), 22 deletions(-) rename ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/{SmsConfig.java => SmsAutoConfiguration.java} (64%) delete mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/properties/SmsProperties.java diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsConfig.java b/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsAutoConfiguration.java similarity index 64% rename from ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsConfig.java rename to ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsAutoConfiguration.java index 6b5a84442..29f60fc50 100644 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsConfig.java +++ b/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsAutoConfiguration.java @@ -3,13 +3,12 @@ package org.dromara.common.sms.config; import org.springframework.boot.autoconfigure.AutoConfiguration; /** - * 短信配置类 + * 短信配置类(暂时没用 预留扩展) * * @author Lion Li * @version 4.2.0 */ @AutoConfiguration -//@EnableConfigurationProperties(SmsProperties.class) -public class SmsConfig { +public class SmsAutoConfiguration { } diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/properties/SmsProperties.java b/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/properties/SmsProperties.java deleted file mode 100644 index c7b3ef1a5..000000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/properties/SmsProperties.java +++ /dev/null @@ -1,19 +0,0 @@ -//package org.dromara.common.sms.config.properties; -// -//import lombok.Data; -//import org.springframework.boot.context.properties.ConfigurationProperties; -// -///** -// * SMS短信 配置属性 -// * -// * @author Lion Li -// * @version 4.2.0 -// */ -//@Data -//@ConfigurationProperties(prefix = "sms") -//public class SmsProperties { -// -// private Boolean enabled; -// -// -//} From ce8a82383de5cbb8e848cf4f1f18ca643f719673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 8 Dec 2023 10:36:56 +0800 Subject: [PATCH 12/32] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9a0be4db..874dc5365 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ | 权限认证 | 采用 Sa-Token、Jwt 静态使用功能齐全 低耦合 高扩展 | Spring Security 配置繁琐扩展性极差 | | 权限注解 | 采用 Sa-Token 支持注解 登录校验、角色校验、权限校验、二级认证校验、HttpBasic校验、忽略校验
角色与权限校验支持多种条件 如 `AND` `OR` 或 `权限 OR 角色` 等复杂表达式 | 只支持是否存在匹配 | | 三方鉴权 | 采用 JustAuth 第三方登录组件 支持微信、钉钉等数十种三方认证 | 无 | -| 关系数据库支持 | 原生支持 MySQL、Oracle、PostgreSQL、SQLServer
可同时使用异构切换 | 支持 Mysql、Oracle 不支持同时使用、不支持异构切换 | +| 关系数据库支持 | 原生支持 MySQL、Oracle、PostgreSQL、SQLServer
可同时使用异构切换(支持其他 mybatis-plus 支持的所有数据库 只需要增加jdbc依赖即可使用 达梦金仓等均有成功案例) | 支持 Mysql、Oracle 不支持同时使用、不支持异构切换 | | 缓存数据库 | 支持 Redis 5-7 支持大部分新功能特性 如 分布式限流、分布式队列 | Redis 简单 get set 支持 | | Redis客户端 | 采用 Redisson Redis官方推荐 基于Netty的客户端工具
支持Redis 90%以上的命令 底层优化规避很多不正确的用法 例如: keys被转换为scan
支持单机、哨兵、单主集群、多主集群等模式 | Lettuce + RedisTemplate 支持模式少 工具使用繁琐
连接池采用 common-pool Bug多经常性出问题 | | 缓存注解 | 采用 Spring-Cache 注解 对其扩展了实现支持了更多功能
例如 过期时间 最大空闲时间 组最大长度等 只需一个注解即可完成数据自动缓存 | 需手动编写Redis代码逻辑 | From 6037edb621dc83522d4801b34c297720d8899ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 8 Dec 2023 15:04:14 +0800 Subject: [PATCH 13/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20sms?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20=E9=A2=84=E7=95=99=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...springframework.boot.autoconfigure.AutoConfiguration.imports | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-sms/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-sms/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 6988c7efa..5919ce327 100644 --- a/ruoyi-common/ruoyi-common-sms/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/ruoyi-common/ruoyi-common-sms/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -org.dromara.common.sms.config.SmsConfig +org.dromara.common.sms.config.SmsAutoConfiguration From 48fdfffc42291c1ec207736c35249f554bf58046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 11 Dec 2023 12:56:25 +0800 Subject: [PATCH 14/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E8=A1=A5?= =?UTF-8?q?=E5=85=A8=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/i18n/messages.properties | 5 ++++- .../src/main/resources/i18n/messages_en_US.properties | 5 ++++- .../src/main/resources/i18n/messages_zh_CN.properties | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/resources/i18n/messages.properties b/ruoyi-admin/src/main/resources/i18n/messages.properties index c8635612a..cce11c85d 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages.properties @@ -50,7 +50,10 @@ sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1} email.code.not.blank=邮箱验证码不能为空 email.code.retry.limit.count=邮箱验证码输入错误{0}次 email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟 -xcx.code.not.blank=小程序code不能为空 +xcx.code.not.blank=小程序[code]不能为空 +social.source.not.blank=第三方登录平台[source]不能为空 +social.code.not.blank=第三方登录平台[code]不能为空 +social.state.not.blank=第三方登录平台[state]不能为空 ##租户 tenant.number.not.blank=租户编号不能为空 tenant.not.exists=对不起, 您的租户不存在,请联系管理员 diff --git a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties index 355da8432..f948c4ab8 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties @@ -50,7 +50,10 @@ sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for { email.code.not.blank=Email code cannot be blank email.code.retry.limit.count=Email code input error {0} times email.code.retry.limit.exceed=Email code input error {0} times, account locked for {1} minutes -xcx.code.not.blank=Mini program code cannot be blank +xcx.code.not.blank=Mini program [code] cannot be blank +social.source.not.blank=Social login platform [source] cannot be blank +social.code.not.blank=Social login platform [code] cannot be blank +social.state.not.blank=Social login platform [state] cannot be blank ##租户 tenant.number.not.blank=Tenant number cannot be blank tenant.not.exists=Sorry, your tenant does not exist. Please contact the administrator diff --git a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties index c8635612a..cce11c85d 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -50,7 +50,10 @@ sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1} email.code.not.blank=邮箱验证码不能为空 email.code.retry.limit.count=邮箱验证码输入错误{0}次 email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟 -xcx.code.not.blank=小程序code不能为空 +xcx.code.not.blank=小程序[code]不能为空 +social.source.not.blank=第三方登录平台[source]不能为空 +social.code.not.blank=第三方登录平台[code]不能为空 +social.state.not.blank=第三方登录平台[state]不能为空 ##租户 tenant.number.not.blank=租户编号不能为空 tenant.not.exists=对不起, 您的租户不存在,请联系管理员 From 0403c2c274bf47162ba810b1f0e436a91c63e6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 12 Dec 2023 10:52:00 +0800 Subject: [PATCH 15/32] update powerjob 4.3.3 => 4.3.6 --- pom.xml | 2 +- ruoyi-admin/src/main/resources/application-dev.yml | 2 +- ruoyi-admin/src/main/resources/application-prod.yml | 2 +- ruoyi-extend/ruoyi-powerjob-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 13246136b..546888555 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ 2.2.5 4.2.0 2.14.4 - 4.3.3 + 4.3.6 1.3.5 0.2.0 1.18.30 diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 584e6104b..4aaea57e7 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -15,7 +15,7 @@ powerjob: enabled: false # 需要先在 powerjob 登录页执行应用注册后才能使用 app-name: ruoyi-worker - enable-test-mode: false + allow-lazy-connect-server: false max-appended-wf-context-length: 4096 max-result-length: 4096 # 28080 端口 随着主应用端口飘逸 避免集群冲突 diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index 44437791f..782a680a1 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -18,7 +18,7 @@ powerjob: enabled: false # 需要先在 powerjob 登录页执行应用注册后才能使用 app-name: ruoyi-worker - enable-test-mode: false + allow-lazy-connect-server: false max-appended-wf-context-length: 4096 max-result-length: 4096 # 28080 端口 随着主应用端口飘逸 避免集群冲突 diff --git a/ruoyi-extend/ruoyi-powerjob-server/pom.xml b/ruoyi-extend/ruoyi-powerjob-server/pom.xml index 72b23789a..bdb92a400 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/pom.xml +++ b/ruoyi-extend/ruoyi-powerjob-server/pom.xml @@ -10,7 +10,7 @@ ruoyi-powerjob-server - 2.7.17 + 2.7.18 2.7.11 From 663e22ac294acf7a26ab2307b04ddd24700fd88b Mon Sep 17 00:00:00 2001 From: Simple <2424585654@qq.com> Date: Tue, 12 Dec 2023 16:58:24 +0800 Subject: [PATCH 16/32] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20excel=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E6=B3=A8=E8=A7=A3=E4=BC=9A=E6=A0=B9=E6=8D=AE=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E5=90=88=E5=B9=B6=E5=88=97=E7=9A=84=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=9D=A5=E5=86=B3=E5=AE=9A=E5=90=8E=E7=BB=AD=E7=9A=84=E5=88=97?= =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/excel/core/CellMergeStrategy.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/CellMergeStrategy.java b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/CellMergeStrategy.java index 08f4dda26..bcb5be767 100644 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/CellMergeStrategy.java +++ b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/CellMergeStrategy.java @@ -98,9 +98,30 @@ public class CellMergeStrategy extends AbstractMergeStrategy { cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); } map.put(field, new RepeatCell(val, i)); - } else if (i == list.size() - 1) { - if (i > repeatCell.getCurrent()) { - cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); + } else if (j == 0) { + if (i == list.size() - 1) { + if (i > repeatCell.getCurrent()) { + cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); + } + } + } else { + // 判断前面的是否合并了 + RepeatCell firstCell = map.get(mergeFields.get(0)); + if (repeatCell.getCurrent() != firstCell.getCurrent()) { + if (i == list.size() - 1) { + if (i > repeatCell.getCurrent()) { + cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); + } + } else if (repeatCell.getCurrent() < firstCell.getCurrent()) { + if (i - repeatCell.getCurrent() > 1) { + cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); + } + map.put(field, new RepeatCell(val, i)); + } + } else if (i == list.size() - 1) { + if (i > repeatCell.getCurrent()) { + cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); + } } } } From 45097ccb8fd30ceb2d965fbed339ef6a195a7c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 12 Dec 2023 22:12:35 +0800 Subject: [PATCH 17/32] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20MybatisSystemE?= =?UTF-8?q?xception=20=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/common/mybatis/handler/MybatisExceptionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java index 64463e60e..c517fa728 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java @@ -35,7 +35,7 @@ public class MybatisExceptionHandler { public R handleCannotFindDataSourceException(MyBatisSystemException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); String message = e.getMessage(); - if (message.contains("CannotFindDataSourceException")) { + if ("CannotFindDataSourceException".contains(message)) { log.error("请求地址'{}', 未找到数据源", requestURI); return R.fail("未找到数据源,请联系管理员确认"); } From c4582b085f880a72dc97f8bff265d0499ae0794b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 13 Dec 2023 12:57:01 +0800 Subject: [PATCH 18/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E5=BC=82=E5=B8=B8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/exception/DemoModeException.java | 17 ------ .../core/exception/GlobalException.java | 56 ------------------- .../common/core/exception/UtilException.java | 26 --------- .../common/core/utils/sql/SqlUtil.java | 7 +-- .../handler/GlobalExceptionHandler.java | 8 --- 5 files changed, 3 insertions(+), 111 deletions(-) delete mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/DemoModeException.java delete mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/GlobalException.java delete mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/UtilException.java diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/DemoModeException.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/DemoModeException.java deleted file mode 100644 index 9916ddf2f..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/DemoModeException.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.dromara.common.core.exception; - -import java.io.Serial; - -/** - * 演示模式异常 - * - * @author ruoyi - */ -public class DemoModeException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - public DemoModeException() { - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/GlobalException.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/GlobalException.java deleted file mode 100644 index 76b1265d7..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/GlobalException.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.dromara.common.core.exception; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.io.Serial; - -/** - * 全局异常 - * - * @author ruoyi - */ -@Data -@EqualsAndHashCode(callSuper = true) -@NoArgsConstructor -@AllArgsConstructor -public class GlobalException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 错误提示 - */ - private String message; - - /** - * 错误明细,内部调试错误 - */ - private String detailMessage; - - public GlobalException(String message) { - this.message = message; - } - - public String getDetailMessage() { - return detailMessage; - } - - public GlobalException setDetailMessage(String detailMessage) { - this.detailMessage = detailMessage; - return this; - } - - @Override - public String getMessage() { - return message; - } - - public GlobalException setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/UtilException.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/UtilException.java deleted file mode 100644 index a9bf2c60e..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/UtilException.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.dromara.common.core.exception; - -import java.io.Serial; - -/** - * 工具类异常 - * - * @author ruoyi - */ -public class UtilException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 8247610319171014183L; - - public UtilException(Throwable e) { - super(e.getMessage(), e); - } - - public UtilException(String message) { - super(message); - } - - public UtilException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/sql/SqlUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/sql/SqlUtil.java index 1ed01a98f..3e109b21a 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/sql/SqlUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/sql/SqlUtil.java @@ -1,9 +1,8 @@ package org.dromara.common.core.utils.sql; -import org.dromara.common.core.exception.UtilException; -import org.dromara.common.core.utils.StringUtils; import lombok.AccessLevel; import lombok.NoArgsConstructor; +import org.dromara.common.core.utils.StringUtils; /** * sql操作工具类 @@ -28,7 +27,7 @@ public class SqlUtil { */ public static String escapeOrderBySql(String value) { if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { - throw new UtilException("参数不符合规范,不能进行查询"); + throw new IllegalArgumentException("参数不符合规范,不能进行查询"); } return value; } @@ -50,7 +49,7 @@ public class SqlUtil { String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|"); for (String sqlKeyword : sqlKeywords) { if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1) { - throw new UtilException("参数存在SQL注入风险"); + throw new IllegalArgumentException("参数存在SQL注入风险"); } } } diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/handler/GlobalExceptionHandler.java index 1809c613e..a4dcfe3fa 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/handler/GlobalExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/handler/GlobalExceptionHandler.java @@ -10,7 +10,6 @@ import jakarta.validation.ConstraintViolation; import jakarta.validation.ConstraintViolationException; import lombok.extern.slf4j.Slf4j; import org.dromara.common.core.domain.R; -import org.dromara.common.core.exception.DemoModeException; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.exception.base.BaseException; import org.dromara.common.core.utils.StreamUtils; @@ -162,11 +161,4 @@ public class GlobalExceptionHandler { return R.fail(message); } - /** - * 演示模式异常 - */ - @ExceptionHandler(DemoModeException.class) - public R handleDemoModeException(DemoModeException e) { - return R.fail("演示模式,不允许操作"); - } } From 469c334b950854c480dd4de677e72d1aeb735d8a Mon Sep 17 00:00:00 2001 From: "Michelle.Chung" <1242874891@qq.com> Date: Thu, 14 Dec 2023 12:33:21 +0800 Subject: [PATCH 19/32] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20issue=20?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=8F=8F=E8=BF=B0=20;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/ISSUE_TEMPLATE/bug.yml | 14 +++++++------- .gitee/ISSUE_TEMPLATE/feature.yml | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml index 5cb780de3..8a5d06500 100644 --- a/.gitee/ISSUE_TEMPLATE/bug.yml +++ b/.gitee/ISSUE_TEMPLATE/bug.yml @@ -1,5 +1,5 @@ name: Bug 反馈 -description: 当你中发现了一个 Bug,导致应用崩溃或抛出异常,或者有一个组件存在问题,或者某些地方看起来不对劲。 +description: 当你使用过程中发现了一个 Bug,导致应用崩溃或抛出异常,或者有一个组件存在问题,或者某些地方看起来不对劲,请在这里反馈。 title: "[Bug]: " labels: ["bug"] body: @@ -9,14 +9,14 @@ body: label: 版本 description: 你当前正在使用我们软件的哪个版本(pom文件内的版本号)? value: | - jdk版本(带上尾号): 例如 1.8.0 - 框架版本(项目启动时输出的版本号): 例如 4.4.0 + jdk版本(带上尾号): 例如 17.0.8 + 框架版本(项目启动时输出的版本号): 例如 5.1.1 其他依赖版本(你觉得有必要的): validations: required: true - type: checkboxes attributes: - label: 功能不好用不会用是否已经看过项目文档? + label: 功能不好用不会用是否已经看过项目文档? options: - label: https://plus-doc.dromara.org required: true @@ -35,10 +35,10 @@ body: - type: markdown attributes: label: 如何复现 - description: 请详细告诉我们如何复现你遇到的问题 + description: 请详细告诉我们如何复现你遇到的问题。 value: | - 如涉及代码 可提供一个最小代码示例 并使用```附上它 或者截图均可 越详细越好
- 大多数问题都是 代码编写错误问题 逻辑问题 或者用法错误等问题 + 如涉及代码,可提供一个最小代码示例,并使用```附上它,或者截图均可,越详细越好。
+ 大多数问题都是:代码编写错误问题,逻辑问题,或者用法错误等问题。 validations: required: true - type: textarea diff --git a/.gitee/ISSUE_TEMPLATE/feature.yml b/.gitee/ISSUE_TEMPLATE/feature.yml index 5639dbb07..0d9709ace 100644 --- a/.gitee/ISSUE_TEMPLATE/feature.yml +++ b/.gitee/ISSUE_TEMPLATE/feature.yml @@ -1,5 +1,5 @@ name: 功能建议 -description: 对本项目提出一个功能建议 +description: 对本项目提出一个功能建议。 title: "[功能建议]: " labels: ["enhancement"] body: @@ -39,5 +39,5 @@ body: attributes: label: 意向参与贡献 options: - - label: 我有意向参与具体功能的开发实现并将代码贡献回到上游社区 - required: false \ No newline at end of file + - label: 我有意向参与具体功能的开发实现并将代码贡献回到上游社区。 + required: false From 7fb4d17913039bb1e7cce1253d3e0796e067bfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 14 Dec 2023 15:38:27 +0800 Subject: [PATCH 20/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E5=BC=82=E5=B8=B8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/UserPasswordNotMatchException.java | 18 ------------------ ...UserPasswordRetryLimitExceedException.java | 19 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordNotMatchException.java delete mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordRetryLimitExceedException.java diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordNotMatchException.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordNotMatchException.java deleted file mode 100644 index 289cca754..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordNotMatchException.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.dromara.common.core.exception.user; - -import java.io.Serial; - -/** - * 用户密码不正确或不符合规范异常类 - * - * @author ruoyi - */ -public class UserPasswordNotMatchException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public UserPasswordNotMatchException() { - super("user.password.not.match"); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordRetryLimitExceedException.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordRetryLimitExceedException.java deleted file mode 100644 index 2facdebfb..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/exception/user/UserPasswordRetryLimitExceedException.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.dromara.common.core.exception.user; - -import java.io.Serial; - -/** - * 用户错误最大次数异常类 - * - * @author ruoyi - */ -public class UserPasswordRetryLimitExceedException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public UserPasswordRetryLimitExceedException(int retryLimitCount, int lockTime) { - super("user.password.retry.limit.exceed", retryLimitCount, lockTime); - } - -} From e1e409d89e040a291fd97bbef7cbf44f3385bcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 14 Dec 2023 15:38:58 +0800 Subject: [PATCH 21/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20SocialUtils?= =?UTF-8?q?=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/social/utils/SocialUtils.java | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java index 572a5d09f..51b7e13d7 100644 --- a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java +++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java @@ -35,33 +35,34 @@ public class SocialUtils { if (ObjectUtil.isNull(obj)) { throw new AuthException("不支持的第三方登录类型"); } - String clientId = obj.getClientId(); - String clientSecret = obj.getClientSecret(); - String redirectUri = obj.getRedirectUri(); + AuthConfig.AuthConfigBuilder builder = AuthConfig.builder() + .clientId(obj.getClientId()) + .clientSecret(obj.getClientSecret()) + .redirectUri(obj.getRedirectUri()); return switch (source.toLowerCase()) { - case "dingtalk" -> new AuthDingTalkRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "baidu" -> new AuthBaiduRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "github" -> new AuthGithubRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "gitee" -> new AuthGiteeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "weibo" -> new AuthWeiboRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "coding" -> new AuthCodingRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "oschina" -> new AuthOschinaRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); + case "dingtalk" -> new AuthDingTalkRequest(builder.build(), STATE_CACHE); + case "baidu" -> new AuthBaiduRequest(builder.build(), STATE_CACHE); + case "github" -> new AuthGithubRequest(builder.build(), STATE_CACHE); + case "gitee" -> new AuthGiteeRequest(builder.build(), STATE_CACHE); + case "weibo" -> new AuthWeiboRequest(builder.build(), STATE_CACHE); + case "coding" -> new AuthCodingRequest(builder.build(), STATE_CACHE); + case "oschina" -> new AuthOschinaRequest(builder.build(), STATE_CACHE); // 支付宝在创建回调地址时,不允许使用localhost或者127.0.0.1,所以这儿的回调地址使用的局域网内的ip - case "alipay_wallet" -> new AuthAlipayRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), socialProperties.getType().get("alipay_wallet").getAlipayPublicKey(), STATE_CACHE); - case "qq" -> new AuthQqRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "wechat_open" -> new AuthWeChatOpenRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "taobao" -> new AuthTaobaoRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "douyin" -> new AuthDouyinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "linkedin" -> new AuthLinkedinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "microsoft" -> new AuthMicrosoftRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "renren" -> new AuthRenrenRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "stack_overflow" -> new AuthStackOverflowRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).stackOverflowKey("").build(), STATE_CACHE); - case "huawei" -> new AuthHuaweiRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "wechat_enterprise" -> new AuthWeChatEnterpriseQrcodeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).agentId("").build(), STATE_CACHE); - case "gitlab" -> new AuthGitlabRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "wechat_mp" -> new AuthWeChatMpRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "aliyun" -> new AuthAliyunRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); - case "maxkey" -> new AuthMaxKeyRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); + case "alipay_wallet" -> new AuthAlipayRequest(builder.build(), socialProperties.getType().get("alipay_wallet").getAlipayPublicKey(), STATE_CACHE); + case "qq" -> new AuthQqRequest(builder.build(), STATE_CACHE); + case "wechat_open" -> new AuthWeChatOpenRequest(builder.build(), STATE_CACHE); + case "taobao" -> new AuthTaobaoRequest(builder.build(), STATE_CACHE); + case "douyin" -> new AuthDouyinRequest(builder.build(), STATE_CACHE); + case "linkedin" -> new AuthLinkedinRequest(builder.build(), STATE_CACHE); + case "microsoft" -> new AuthMicrosoftRequest(builder.build(), STATE_CACHE); + case "renren" -> new AuthRenrenRequest(builder.build(), STATE_CACHE); + case "stack_overflow" -> new AuthStackOverflowRequest(builder.stackOverflowKey("").build(), STATE_CACHE); + case "huawei" -> new AuthHuaweiRequest(builder.build(), STATE_CACHE); + case "wechat_enterprise" -> new AuthWeChatEnterpriseQrcodeRequest(builder.agentId("").build(), STATE_CACHE); + case "gitlab" -> new AuthGitlabRequest(builder.build(), STATE_CACHE); + case "wechat_mp" -> new AuthWeChatMpRequest(builder.build(), STATE_CACHE); + case "aliyun" -> new AuthAliyunRequest(builder.build(), STATE_CACHE); + case "maxkey" -> new AuthMaxKeyRequest(builder.build(), STATE_CACHE); default -> throw new AuthException("未获取到有效的Auth配置"); }; } From e981e2f69fb2bde84095208ce5a9d7b2bd455e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 19 Dec 2023 09:49:01 +0800 Subject: [PATCH 22/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E6=8E=A5=E5=8F=A3=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=99=90=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/web/controller/CaptchaController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-admin/src/main/java/org/dromara/web/controller/CaptchaController.java b/ruoyi-admin/src/main/java/org/dromara/web/controller/CaptchaController.java index 656447e89..ef33f5b6f 100644 --- a/ruoyi-admin/src/main/java/org/dromara/web/controller/CaptchaController.java +++ b/ruoyi-admin/src/main/java/org/dromara/web/controller/CaptchaController.java @@ -13,6 +13,8 @@ import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.reflect.ReflectUtils; import org.dromara.common.mail.config.properties.MailProperties; import org.dromara.common.mail.utils.MailUtils; +import org.dromara.common.ratelimiter.annotation.RateLimiter; +import org.dromara.common.ratelimiter.enums.LimitType; import org.dromara.common.redis.utils.RedisUtils; import org.dromara.common.web.config.properties.CaptchaProperties; import org.dromara.common.web.enums.CaptchaType; @@ -54,6 +56,7 @@ public class CaptchaController { * * @param phonenumber 用户手机号 */ + @RateLimiter(key = "#phonenumber", time = 60, count = 1) @GetMapping("/resource/sms/code") public R smsCode(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) { String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber; @@ -77,6 +80,7 @@ public class CaptchaController { * * @param email 邮箱 */ + @RateLimiter(key = "#email", time = 60, count = 1) @GetMapping("/resource/email/code") public R emailCode(@NotBlank(message = "{user.email.not.blank}") String email) { if (!mailProperties.getEnabled()) { @@ -97,6 +101,7 @@ public class CaptchaController { /** * 生成验证码 */ + @RateLimiter(time = 60, count = 10, limitType = LimitType.IP) @GetMapping("/auth/code") public R getCode() { CaptchaVo captchaVo = new CaptchaVo(); From 0ac4a63e916e720ed80c3dcd7015310530f6bdbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 19 Dec 2023 13:59:05 +0800 Subject: [PATCH 23/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=B8=BA?= =?UTF-8?q?=20admin=20=E6=A8=A1=E5=9D=97=20=E5=8D=95=E7=8B=AC=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0ratelimiter=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 81933591e..26cd02333 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -48,6 +48,10 @@ ruoyi-common-social + + org.dromara + ruoyi-common-ratelimiter + org.dromara From 3a51c58b82a393147d24862654deb27f8a24e0d7 Mon Sep 17 00:00:00 2001 From: zzubnnn Date: Wed, 20 Dec 2023 13:38:27 +0800 Subject: [PATCH 24/32] =?UTF-8?q?=E3=80=90BUG=E4=BF=AE=E5=A4=8D=E3=80=91PG?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=84=9A=E6=9C=AC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/sql/postgres/powerjob.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/sql/postgres/powerjob.sql b/script/sql/postgres/powerjob.sql index 0e2265d3f..56d3bcbc1 100644 --- a/script/sql/postgres/powerjob.sql +++ b/script/sql/postgres/powerjob.sql @@ -116,10 +116,10 @@ CREATE TABLE pj_job_info ( CREATE INDEX idx01_job_info ON pj_job_info USING btree (app_id, status, time_expression_type, next_trigger_time); -INSERT INTO pj_job_info VALUES(1, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717', '2023-07-04 17:22:12.374', 1, 0, '', '单机处理器执行测试', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3); -INSERT INTO pj_job_info VALUES(2, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342', '2023-07-04 17:22:12.816', 0, 0, NULL, '广播处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3); -INSERT INTO pj_job_info VALUES(3, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519', '2023-06-02 16:03:22.421', 0, 0, NULL, 'Map处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3); -INSERT INTO pj_job_info VALUES(4, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896', '2023-06-02 16:03:23.125', 0, 0, NULL, 'MapReduce处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3); +INSERT INTO pj_job_info VALUES(1, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717', '2023-07-04 17:22:12.374', 1, 0, '', '单机处理器执行测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3); +INSERT INTO pj_job_info VALUES(2, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342', '2023-07-04 17:22:12.816', 0, 0, NULL, '广播处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3); +INSERT INTO pj_job_info VALUES(3, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519', '2023-06-02 16:03:22.421', 0, 0, NULL, 'Map处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3); +INSERT INTO pj_job_info VALUES(4, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896', '2023-06-02 16:03:23.125', 0, 0, NULL, 'MapReduce处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3); -- pj_oms_lock definition From c241a715a4e9088486324a5dd97ee885865ca82f Mon Sep 17 00:00:00 2001 From: zzubnnn Date: Wed, 20 Dec 2023 14:47:34 +0800 Subject: [PATCH 25/32] =?UTF-8?q?=E3=80=90BUG=E4=BF=AE=E5=A4=8D=E3=80=91OR?= =?UTF-8?q?ACLE=E3=80=81SQLSERVER=E6=95=B0=E6=8D=AE=E5=BA=93=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/sql/oracle/powerjob.sql | 8 ++++---- script/sql/sqlserver/powerjob.sql | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/script/sql/oracle/powerjob.sql b/script/sql/oracle/powerjob.sql index 83ebd410f..7a5419d81 100644 --- a/script/sql/oracle/powerjob.sql +++ b/script/sql/oracle/powerjob.sql @@ -159,10 +159,10 @@ DISABLE ROW MOVEMENT -- ---------------------------- -- Records of "PJ_JOB_INFO" -- ---------------------------- -INSERT INTO "PJ_JOB_INFO" VALUES ('1', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '2', '1', NULL, NULL, NULL, '1', '0', NULL, '单机处理器执行测试', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', '1', '2', NULL, '1', '30000', '3'); -INSERT INTO "PJ_JOB_INFO" VALUES ('2', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '2', NULL, NULL, NULL, '0', '0', NULL, '广播处理器测试', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', '1', '2', NULL, '1', '30000', '3'); -INSERT INTO "PJ_JOB_INFO" VALUES ('3', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '4', NULL, NULL, NULL, '0', '0', NULL, 'Map处理器测试', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', '1', '2', NULL, '1', '1000', '3'); -INSERT INTO "PJ_JOB_INFO" VALUES ('4', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '3', NULL, NULL, NULL, '0', '0', NULL, 'MapReduce处理器测试', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', '1', '2', NULL, '1', '1000', '3'); +INSERT INTO "PJ_JOB_INFO" VALUES ('1', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '2', '1', NULL, NULL, NULL, '1', '0', NULL, '单机处理器执行测试', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', '1', '2', NULL, '1', '30000', '3'); +INSERT INTO "PJ_JOB_INFO" VALUES ('2', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '2', NULL, NULL, NULL, '0', '0', NULL, '广播处理器测试', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', '1', '2', NULL, '1', '30000', '3'); +INSERT INTO "PJ_JOB_INFO" VALUES ('3', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '4', NULL, NULL, NULL, '0', '0', NULL, 'Map处理器测试', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', '1', '2', NULL, '1', '1000', '3'); +INSERT INTO "PJ_JOB_INFO" VALUES ('4', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '3', NULL, NULL, NULL, '0', '0', NULL, 'MapReduce处理器测试', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', '1', '2', NULL, '1', '1000', '3'); -- ---------------------------- -- Table structure for PJ_OMS_LOCK diff --git a/script/sql/sqlserver/powerjob.sql b/script/sql/sqlserver/powerjob.sql index 9233866ad..1148b2c21 100644 --- a/script/sql/sqlserver/powerjob.sql +++ b/script/sql/sqlserver/powerjob.sql @@ -130,16 +130,16 @@ GO SET IDENTITY_INSERT [pj_job_info] ON GO -INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'1', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'2', N'1', NULL, N'2023-06-02 15:01:27.7170000', N'2023-07-04 17:22:12.3740000', N'1', N'0', N'', N'?????????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.StandaloneProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') +INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'1', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'2', N'1', NULL, N'2023-06-02 15:01:27.7170000', N'2023-07-04 17:22:12.3740000', N'1', N'0', N'', N'?????????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.StandaloneProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') GO -INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'2', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'2', NULL, N'2023-06-02 15:04:45.3420000', N'2023-07-04 17:22:12.8160000', N'0', N'0', NULL, N'???????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.BroadcastProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') +INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'2', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'2', NULL, N'2023-06-02 15:04:45.3420000', N'2023-07-04 17:22:12.8160000', N'0', N'0', NULL, N'???????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.BroadcastProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') GO -INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'3', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'4', NULL, N'2023-06-02 15:13:23.5190000', N'2023-06-02 16:03:22.4210000', N'0', N'0', NULL, N'Map?????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') +INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'3', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'4', NULL, N'2023-06-02 15:13:23.5190000', N'2023-06-02 16:03:22.4210000', N'0', N'0', NULL, N'Map?????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') GO -INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'4', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'3', NULL, N'2023-06-02 15:45:25.8960000', N'2023-06-02 16:03:23.1250000', N'0', N'0', NULL, N'MapReduce?????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapReduceProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') +INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'4', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'3', NULL, N'2023-06-02 15:45:25.8960000', N'2023-06-02 16:03:23.1250000', N'0', N'0', NULL, N'MapReduce?????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapReduceProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') GO SET IDENTITY_INSERT [pj_job_info] OFF From 102d854743c13012688a1cf6e6f48d57e51d71cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 21 Dec 2023 11:02:06 +0800 Subject: [PATCH 26/32] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E4=B8=8D=E6=AD=A3=E5=B8=B8=E7=B1=BB=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/mybatis/handler/PlusDataPermissionHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java index aa6a4c075..6ddaa243c 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java @@ -149,7 +149,12 @@ public class PlusDataPermissionHandler { int index = sb.lastIndexOf("."); String clazzName = sb.substring(0, index); String methodName = sb.substring(index + 1, sb.length()); - Class clazz = ClassUtil.loadClass(clazzName); + Class clazz; + try { + clazz = ClassUtil.loadClass(clazzName); + } catch (Exception e) { + return null; + } List methods = Arrays.stream(ClassUtil.getDeclaredMethods(clazz)) .filter(method -> method.getName().equals(methodName)).toList(); DataPermission dataPermission; From a62eba5c37801e7cce587cdfa3d5233b73aafe5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 21 Dec 2023 11:20:22 +0800 Subject: [PATCH 27/32] =?UTF-8?q?update=20mybatis-boot=203.0.2=20=3D>=203.?= =?UTF-8?q?0.3=20=E4=BC=98=E5=8C=96=E4=BE=9D=E8=B5=96=E4=BC=A0=E9=80=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- ruoyi-common/ruoyi-common-mybatis/pom.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 546888555..081a63ad6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ UTF-8 UTF-8 17 - 3.0.2 + 3.0.3 2.2.0 0.15.0 5.2.3 diff --git a/ruoyi-common/ruoyi-common-mybatis/pom.xml b/ruoyi-common/ruoyi-common-mybatis/pom.xml index 51199b408..2088b5439 100644 --- a/ruoyi-common/ruoyi-common-mybatis/pom.xml +++ b/ruoyi-common/ruoyi-common-mybatis/pom.xml @@ -32,9 +32,20 @@ dynamic-datasource-spring-boot3-starter + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + com.baomidou mybatis-plus-boot-starter + + + org.mybatis + mybatis-spring + + From 00d85947b065f0a3b049a74c1f00a63c4b6023cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 21 Dec 2023 11:27:53 +0800 Subject: [PATCH 28/32] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20selectDictType?= =?UTF-8?q?ByType=20=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/system/service/impl/SysDictTypeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDictTypeServiceImpl.java index 8d3499c02..346d6bc83 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDictTypeServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDictTypeServiceImpl.java @@ -125,7 +125,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService */ @Override public SysDictTypeVo selectDictTypeByType(String dictType) { - return baseMapper.selectVoById(new LambdaQueryWrapper().eq(SysDictType::getDictType, dictType)); + return baseMapper.selectVoOne(new LambdaQueryWrapper().eq(SysDictType::getDictType, dictType)); } /** From 521596bc12863f7a87a8a07ce81f18151e962a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 21 Dec 2023 13:09:09 +0800 Subject: [PATCH 29/32] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=B8=B0?= =?UTF-8?q?=E5=AF=8CRedisUtils=E5=AF=B9List=20Set=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/redis/utils/RedisUtils.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java index ee58411f7..ce32055bb 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java @@ -254,6 +254,18 @@ public class RedisUtils { return rList.addAll(dataList); } + /** + * 追加缓存List数据 + * + * @param key 缓存的键值 + * @param data 待缓存的数据 + * @return 缓存的对象 + */ + public static boolean addCacheList(final String key, final T data) { + RList rList = CLIENT.getList(key); + return rList.add(data); + } + /** * 注册List监听器 *

@@ -278,6 +290,19 @@ public class RedisUtils { return rList.readAll(); } + /** + * 获得缓存的list对象(范围) + * + * @param key 缓存的键值 + * @param form 起始下标 + * @param to 截止下标 + * @return 缓存键值对应的数据 + */ + public static List getCacheListRange(final String key, int form, int to) { + RList rList = CLIENT.getList(key); + return rList.range(form, to); + } + /** * 缓存Set * @@ -290,6 +315,18 @@ public class RedisUtils { return rSet.addAll(dataSet); } + /** + * 追加缓存Set数据 + * + * @param key 缓存的键值 + * @param data 待缓存的数据 + * @return 缓存的对象 + */ + public static boolean addCacheSet(final String key, final T data) { + RSet rSet = CLIENT.getSet(key); + return rSet.add(data); + } + /** * 注册Set监听器 *

From 7445934371e3b0ba6fef5846fb83e23906c699c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 22 Dec 2023 13:13:10 +0800 Subject: [PATCH 30/32] update springboot 3.1.5 => 3.1.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 081a63ad6..526e54c16 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 5.1.1 - 3.1.5 + 3.1.7 UTF-8 UTF-8 17 From 5bc6b1de3addf07b1c893375a0b8024dae633e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 22 Dec 2023 13:15:12 +0800 Subject: [PATCH 31/32] =?UTF-8?q?=F0=9F=A7=A8=E5=8F=91=E5=B8=83=205.1.2=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=202023=20=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .run/ruoyi-monitor-admin.run.xml | 2 +- .run/ruoyi-powerjob-server.run.xml | 2 +- .run/ruoyi-server.run.xml | 2 +- README.md | 2 +- pom.xml | 2 +- ruoyi-common/ruoyi-common-bom/pom.xml | 2 +- script/docker/docker-compose.yml | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.run/ruoyi-monitor-admin.run.xml b/.run/ruoyi-monitor-admin.run.xml index aa1d7a594..4837d6a42 100644 --- a/.run/ruoyi-monitor-admin.run.xml +++ b/.run/ruoyi-monitor-admin.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-powerjob-server.run.xml b/.run/ruoyi-powerjob-server.run.xml index 61e74ea7f..77a4af095 100644 --- a/.run/ruoyi-powerjob-server.run.xml +++ b/.run/ruoyi-powerjob-server.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-server.run.xml b/.run/ruoyi-server.run.xml index 4842e0ba2..a29ff2a7f 100644 --- a/.run/ruoyi-server.run.xml +++ b/.run/ruoyi-server.run.xml @@ -2,7 +2,7 @@ - diff --git a/README.md b/README.md index 874dc5365..c2ddd191d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus/blob/master/LICENSE) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
-[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-5.1.1-success.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus) +[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-5.1.2-success.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus) [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.1-blue.svg)]() [![JDK-17](https://img.shields.io/badge/JDK-17-green.svg)]() [![JDK-21](https://img.shields.io/badge/JDK-21-green.svg)]() diff --git a/pom.xml b/pom.xml index 526e54c16..3aafe144a 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ RuoYi-Vue-Plus多租户管理系统 - 5.1.1 + 5.1.2 3.1.7 UTF-8 UTF-8 diff --git a/ruoyi-common/ruoyi-common-bom/pom.xml b/ruoyi-common/ruoyi-common-bom/pom.xml index 66a9ec86f..004b035de 100644 --- a/ruoyi-common/ruoyi-common-bom/pom.xml +++ b/ruoyi-common/ruoyi-common-bom/pom.xml @@ -14,7 +14,7 @@ - 5.1.1 + 5.1.2 diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index 598189d40..63d819e0c 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -100,7 +100,7 @@ services: network_mode: "host" ruoyi-server1: - image: ruoyi/ruoyi-server:5.1.1 + image: ruoyi/ruoyi-server:5.1.2 container_name: ruoyi-server1 environment: # 时区上海 @@ -115,7 +115,7 @@ services: network_mode: "host" ruoyi-server2: - image: ruoyi/ruoyi-server:5.1.1 + image: ruoyi/ruoyi-server:5.1.2 container_name: ruoyi-server2 environment: # 时区上海 @@ -130,7 +130,7 @@ services: network_mode: "host" ruoyi-monitor-admin: - image: ruoyi/ruoyi-monitor-admin:5.1.1 + image: ruoyi/ruoyi-monitor-admin:5.1.2 container_name: ruoyi-monitor-admin environment: # 时区上海 @@ -142,7 +142,7 @@ services: network_mode: "host" ruoyi-powerjob-server: - image: ruoyi/ruoyi-powerjob-server:5.1.1 + image: ruoyi/ruoyi-powerjob-server:5.1.2 container_name: ruoyi-powerjob-server environment: # 时区上海 From 82c62091aaeb68c8acce85188a37f664a70b9f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 22 Dec 2023 16:01:31 +0800 Subject: [PATCH 32/32] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20mybatis-plus?= =?UTF-8?q?=20=E4=B8=8E=20springboot=20=E5=86=B2=E7=AA=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98(=E7=AD=89mp=E5=8F=91=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=A0=E9=99=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/mybatis/config/MybatisPlusConfig.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/config/MybatisPlusConfig.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/config/MybatisPlusConfig.java index c07a2bb3b..1689e3cdf 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/config/MybatisPlusConfig.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/config/MybatisPlusConfig.java @@ -1,9 +1,12 @@ package org.dromara.common.mybatis.config; import cn.hutool.core.net.NetUtil; +import com.baomidou.mybatisplus.autoconfigure.DdlApplicationRunner; +import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator; import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.baomidou.mybatisplus.extension.ddl.IDdl; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; @@ -11,18 +14,21 @@ import org.dromara.common.core.factory.YmlPropertySourceFactory; import org.dromara.common.mybatis.handler.InjectionMetaObjectHandler; import org.dromara.common.mybatis.interceptor.PlusDataPermissionInterceptor; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.PropertySource; import org.springframework.transaction.annotation.EnableTransactionManagement; +import java.util.List; + /** * mybatis-plus配置类(下方注释有插件介绍) * * @author Lion Li */ @EnableTransactionManagement(proxyTargetClass = true) -@AutoConfiguration +@AutoConfiguration(before = MybatisPlusAutoConfiguration.class) @MapperScan("${mybatis-plus.mapperPackage}") @PropertySource(value = "classpath:common-mybatis.yml", factory = YmlPropertySourceFactory.class) public class MybatisPlusConfig { @@ -102,4 +108,9 @@ public class MybatisPlusConfig { * https://baomidou.com/pages/2a45ff/ */ + @Bean + public DdlApplicationRunner ddlApplicationRunner(@Autowired(required = false) List ddlList) { + return new DdlApplicationRunner(ddlList); + } + }