From 494928ed888a3bbbc14e720b76528a6cb60da3d7 Mon Sep 17 00:00:00 2001 From: wfm Date: Fri, 12 May 2023 17:23:21 +0800 Subject: [PATCH 01/37] =?UTF-8?q?feat:=E9=87=8D=E6=94=BE=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mq/job/RedisPendingMessageResendJob.java | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java index f4ba050c0..ad0ae833d 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java @@ -7,17 +7,14 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.redisson.api.RLock; import org.redisson.api.RedissonClient; -import org.springframework.data.redis.connection.stream.Consumer; -import org.springframework.data.redis.connection.stream.MapRecord; -import org.springframework.data.redis.connection.stream.PendingMessagesSummary; -import org.springframework.data.redis.connection.stream.ReadOffset; -import org.springframework.data.redis.connection.stream.StreamOffset; -import org.springframework.data.redis.connection.stream.StreamRecords; +import org.springframework.data.domain.Range; +import org.springframework.data.redis.connection.stream.*; import org.springframework.data.redis.core.StreamOperations; import org.springframework.scheduling.annotation.Scheduled; import java.util.List; import java.util.Map; +import java.util.Objects; /** * 这个任务用于处理,crash 之后的消费者未消费完的消息 @@ -33,6 +30,8 @@ public class RedisPendingMessageResendJob { private final String groupName; private final RedissonClient redissonClient; + private final long expireTime = 1000 * 60; + /** * 一分钟执行一次,这里选择每分钟的35秒执行,是为了避免整点任务过多的问题 */ @@ -54,25 +53,28 @@ public class RedisPendingMessageResendJob { private void execute() { StreamOperations ops = redisTemplate.getRedisTemplate().opsForStream(); listeners.forEach(listener -> { - PendingMessagesSummary pendingMessagesSummary = ops.pending(listener.getStreamKey(), groupName); + PendingMessagesSummary pendingMessagesSummary = Objects.requireNonNull(ops.pending(listener.getStreamKey(), groupName)); // 每个消费者的 pending 队列消息数量 Map pendingMessagesPerConsumer = pendingMessagesSummary.getPendingMessagesPerConsumer(); pendingMessagesPerConsumer.forEach((consumerName, pendingMessageCount) -> { log.info("[processPendingMessage][消费者({}) 消息数量({})]", consumerName, pendingMessageCount); - // 从消费者的 pending 队列中读取消息 - List> records = ops.read(Consumer.from(groupName, consumerName), StreamOffset.create(listener.getStreamKey(), ReadOffset.from("0"))); - if (CollUtil.isEmpty(records)) { + PendingMessages pendingMessages = ops.pending(listener.getStreamKey(), Consumer.from(groupName, consumerName), Range.unbounded(), pendingMessageCount); + if(pendingMessages.isEmpty()){ return; } - for (MapRecord record : records) { - // 重新投递消息 - redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord() - .ofObject(record.getValue()) // 设置内容 - .withStreamKey(listener.getStreamKey())); - - // ack 消息消费完成 - redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, record); + for (PendingMessage pendingMessage : pendingMessages) { + if(pendingMessage.getElapsedTimeSinceLastDelivery().toMillis() - expireTime >= 0){ + List> records = ops.range(listener.getStreamKey(), Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString()))); + if(!CollUtil.isEmpty(records)){ + // 重新投递消息 + redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord() + .ofObject(records.get(0).getValue()) // 设置内容 + .withStreamKey(listener.getStreamKey())); + // ack 消息消费完成 + redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0)); + } + } } }); }); From 86be0bdf800209ea79086145b0e26be2bac03bf0 Mon Sep 17 00:00:00 2001 From: wfm Date: Tue, 16 May 2023 09:58:58 +0800 Subject: [PATCH 02/37] fix PR --- .../mq/job/RedisPendingMessageResendJob.java | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java index ad0ae833d..4a0fbdfb2 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java @@ -29,8 +29,13 @@ public class RedisPendingMessageResendJob { private final RedisMQTemplate redisTemplate; private final String groupName; private final RedissonClient redissonClient; - - private final long expireTime = 1000 * 60; + /** + * 消息超时时间,默认5分钟 + *

超时的消息才会被重新投递

+ *

由于定时任务1分钟一次,消息超时后不会被立即重投, + * 极端情况下消息5分钟过期后,再等1分钟才会被扫瞄到

+ */ + private final long expireTime = 5 * 60; /** * 一分钟执行一次,这里选择每分钟的35秒执行,是为了避免整点任务过多的问题 @@ -58,23 +63,28 @@ public class RedisPendingMessageResendJob { Map pendingMessagesPerConsumer = pendingMessagesSummary.getPendingMessagesPerConsumer(); pendingMessagesPerConsumer.forEach((consumerName, pendingMessageCount) -> { log.info("[processPendingMessage][消费者({}) 消息数量({})]", consumerName, pendingMessageCount); - + // 每个消费者的 pending消息的详情信息 PendingMessages pendingMessages = ops.pending(listener.getStreamKey(), Consumer.from(groupName, consumerName), Range.unbounded(), pendingMessageCount); if(pendingMessages.isEmpty()){ return; } for (PendingMessage pendingMessage : pendingMessages) { - if(pendingMessage.getElapsedTimeSinceLastDelivery().toMillis() - expireTime >= 0){ - List> records = ops.range(listener.getStreamKey(), Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString()))); - if(!CollUtil.isEmpty(records)){ - // 重新投递消息 - redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord() - .ofObject(records.get(0).getValue()) // 设置内容 - .withStreamKey(listener.getStreamKey())); - // ack 消息消费完成 - redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0)); - } + // 获取消息上一次传递到 consumer 的时间, + long lastDelivery = pendingMessage.getElapsedTimeSinceLastDelivery().getSeconds(); + if(lastDelivery < expireTime){ + continue; } + // 获取指定id的消息体 + List> records = ops.range(listener.getStreamKey(), Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString()))); + if(CollUtil.isEmpty(records)){ + continue; + } + // 重新投递消息 + redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord() + .ofObject(records.get(0).getValue()) // 设置内容 + .withStreamKey(listener.getStreamKey())); + // ack 消息消费完成 + redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0)); } }); }); From 4faf61a4750997bff2a08e8dd135de377d99c3d2 Mon Sep 17 00:00:00 2001 From: wfm Date: Tue, 16 May 2023 10:22:46 +0800 Subject: [PATCH 03/37] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/mq/job/RedisPendingMessageResendJob.java | 1 + 1 file changed, 1 insertion(+) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java index 4a0fbdfb2..689fd2931 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java @@ -85,6 +85,7 @@ public class RedisPendingMessageResendJob { .withStreamKey(listener.getStreamKey())); // ack 消息消费完成 redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0)); + log.info("[processPendingMessage][消息({})重新投递成功]", records.get(0).getId()); } }); }); From 87670265b2a0e7c22014d5ac29643594f8e31ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E7=A0=81=E6=BB=B4=E6=B1=89=E5=AD=90?= <1024@cong.zone> Date: Sun, 4 Jun 2023 15:15:19 +0000 Subject: [PATCH 04/37] =?UTF-8?q?update=20sql/postgresql/ruoyi-vue-pro.sql?= =?UTF-8?q?.=20read=5Fstatus=20=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAbool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 御码滴汉子 <1024@cong.zone> --- sql/postgresql/ruoyi-vue-pro.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index c9cafc642..bcd39c8d8 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -4239,7 +4239,7 @@ CREATE TABLE "system_notify_message" ( "template_content" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL, "template_type" int4 NOT NULL, "template_params" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "read_status" varchar(1) COLLATE "pg_catalog"."default" NOT NULL, + "read_status"" bool NOT NULL, "read_time" timestamp(6), "creator" varchar(64) COLLATE "pg_catalog"."default", "create_time" timestamp(6) NOT NULL, From 9af0aa5f7d4e809d23b74a7ee4a44257841e598f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E7=A0=81=E6=BB=B4=E6=B1=89=E5=AD=90?= <1024@cong.zone> Date: Sun, 4 Jun 2023 15:51:19 +0000 Subject: [PATCH 05/37] =?UTF-8?q?pg=E6=95=B0=E6=8D=AE=E5=BA=93=E8=84=9A?= =?UTF-8?q?=E6=9C=ACsystem=5Fmenu=E8=A1=A8always=5Fshow=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 御码滴汉子 <1024@cong.zone> --- sql/postgresql/ruoyi-vue-pro.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index bcd39c8d8..9a3ae8f60 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -2607,7 +2607,7 @@ CREATE TABLE "system_menu" ( "update_time" timestamp(6) NOT NULL, "deleted" int2 NOT NULL DEFAULT 0, "component_name" varchar(255) COLLATE "pg_catalog"."default", - "always_show" char(1) COLLATE "pg_catalog"."default" + "always_show" bool NULL ) ; COMMENT ON COLUMN "system_menu"."id" IS '菜单ID'; From 87d4f9b71abfc2eeefe0c598b14541761b4c6ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E7=A0=81=E6=BB=B4=E6=B1=89=E5=AD=90?= <1024@cong.zone> Date: Sun, 4 Jun 2023 15:57:02 +0000 Subject: [PATCH 06/37] =?UTF-8?q?=E5=B0=86=E8=8F=9C=E5=8D=95=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=9F=AD=E4=BF=A1=E9=A2=84=E7=BD=AE=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=9B=B4=E6=94=B9=E4=B8=BA=E6=9C=80=E6=96=B0=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 御码滴汉子 <1024@cong.zone> --- sql/postgresql/ruoyi-vue-pro.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index 9a3ae8f60..3160f2021 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -2738,19 +2738,19 @@ INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_i INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1091, '文件查询', 'infra:file:query', 3, 1, 1090, '', '', '', 0, 't', 't', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1092, '文件删除', 'infra:file:delete', 3, 4, 1090, '', '', '', 0, 't', 't', '', '2021-03-12 20:16:20', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1093, '短信管理', '', 1, 11, 1, 'sms', 'validCode', NULL, 0, 't', 't', '1', '2021-04-05 01:10:16', '1', '2022-04-20 17:03:10', 0, NULL, '1'); -INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1094, '短信渠道', '', 2, 0, 1093, 'sms-channel', 'phone', 'system/sms/smsChannel', 0, 't', 't', '', '2021-04-01 11:07:15', '1', '2022-04-20 17:03:10', 0, NULL, '1'); +INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1094, '短信渠道', '', 2, 0, 1093, 'sms-channel', 'phone', 'system/sms/channel', 0, 't', 't', '', '2021-04-01 11:07:15', '1', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1095, '短信渠道查询', 'system:sms-channel:query', 3, 1, 1094, '', '', '', 0, 't', 't', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1096, '短信渠道创建', 'system:sms-channel:create', 3, 2, 1094, '', '', '', 0, 't', 't', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1097, '短信渠道更新', 'system:sms-channel:update', 3, 3, 1094, '', '', '', 0, 't', 't', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1098, '短信渠道删除', 'system:sms-channel:delete', 3, 4, 1094, '', '', '', 0, 't', 't', '', '2021-04-01 11:07:15', '', '2022-04-20 17:03:10', 0, NULL, '1'); -INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1100, '短信模板', '', 2, 1, 1093, 'sms-template', 'phone', 'system/sms/smsTemplate', 0, 't', 't', '', '2021-04-01 17:35:17', '1', '2022-04-20 17:03:10', 0, NULL, '1'); +INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1100, '短信模板', '', 2, 1, 1093, 'sms-template', 'phone', 'system/sms/template', 0, 't', 't', '', '2021-04-01 17:35:17', '1', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1101, '短信模板查询', 'system:sms-template:query', 3, 1, 1100, '', '', '', 0, 't', 't', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1102, '短信模板创建', 'system:sms-template:create', 3, 2, 1100, '', '', '', 0, 't', 't', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1103, '短信模板更新', 'system:sms-template:update', 3, 3, 1100, '', '', '', 0, 't', 't', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1104, '短信模板删除', 'system:sms-template:delete', 3, 4, 1100, '', '', '', 0, 't', 't', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1105, '短信模板导出', 'system:sms-template:export', 3, 5, 1100, '', '', '', 0, 't', 't', '', '2021-04-01 17:35:17', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1106, '发送测试短信', 'system:sms-template:send-sms', 3, 6, 1100, '', '', '', 0, 't', 't', '1', '2021-04-11 00:26:40', '1', '2022-04-20 17:03:10', 0, NULL, '1'); -INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1107, '短信日志', '', 2, 2, 1093, 'sms-log', 'phone', 'system/sms/smsLog', 0, 't', 't', '', '2021-04-11 08:37:05', '1', '2022-04-20 17:03:10', 0, NULL, '1'); +INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1107, '短信日志', '', 2, 2, 1093, 'sms-log', 'phone', 'system/sms/log', 0, 't', 't', '', '2021-04-11 08:37:05', '1', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1108, '短信日志查询', 'system:sms-log:query', 3, 1, 1107, '', '', '', 0, 't', 't', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1109, '短信日志导出', 'system:sms-log:export', 3, 5, 1107, '', '', '', 0, 't', 't', '', '2021-04-11 08:37:05', '', '2022-04-20 17:03:10', 0, NULL, '1'); INSERT INTO "system_menu" ("id", "name", "permission", "type", "sort", "parent_id", "path", "icon", "component", "status", "visible", "keep_alive", "creator", "create_time", "updater", "update_time", "deleted", "component_name", "always_show") VALUES (1110, '错误码管理', '', 2, 12, 1, 'error-code', 'code', 'system/errorCode/index', 0, 't', 't', '', '2021-04-13 21:46:42', '1', '2022-04-20 17:03:10', 0, NULL, '1'); From 3e350151bcc567d2e245b0874ce9f2e34a819081 Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Mon, 5 Jun 2023 14:03:06 +0800 Subject: [PATCH 07/37] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20Set=20access=20token?= =?UTF-8?q?=20expire=20time=20to=200=20=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java index 517b0aa11..d57beb881 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java @@ -37,7 +37,9 @@ public class OAuth2AccessTokenRedisDAO { // 清理多余字段,避免缓存 accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null); long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS); - stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS); + if (time > 0) { + stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS); + } } public void delete(String accessToken) { From 6ca09af97eec54f3fffd5bbe494bced96940e7bd Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Mon, 5 Jun 2023 14:09:49 +0800 Subject: [PATCH 08/37] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E7=94=A8=E6=88=B7=E7=BC=96=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/admin/mail/MailTemplateController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java index 87b338815..a2037d8c5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.mail; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*; import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; @@ -81,7 +83,8 @@ public class MailTemplateController { @Operation(summary = "发送短信") @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')") public CommonResult sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) { - return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null, + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), loginUser != null ? loginUser.getId() : null, sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } From 143bff909a5dc642201a95e9bf46588fc036f60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=B5=E5=91=B5=E5=A4=A7?= <2222671+geekrim@user.noreply.gitee.com> Date: Sat, 10 Jun 2023 03:57:47 +0000 Subject: [PATCH 09/37] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8PG?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=97=B6,=E7=AB=99=E5=86=85?= =?UTF-8?q?=E4=BF=A1=E8=A1=A8=E3=80=81=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=A1=A8=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E9=97=AE=E9=A2=98=20=E5=9C=A8`NotifyMessageDO`?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB=E4=B8=AD`read=5Fstatus`=E6=98=AF?= =?UTF-8?q?=E5=B8=83=E5=B0=94=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=9B=A0=E6=AD=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=AD=E4=B9=9F=E8=A6=81=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=B8=BA=20`bool`=20=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E5=90=A6=E5=88=99=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99=E3=80=82?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90=E8=A1=A8`system=5Fmenu`?= =?UTF-8?q?=E8=A1=A8=E5=90=8C=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index c9cafc642..d66d6fcb5 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -2607,7 +2607,7 @@ CREATE TABLE "system_menu" ( "update_time" timestamp(6) NOT NULL, "deleted" int2 NOT NULL DEFAULT 0, "component_name" varchar(255) COLLATE "pg_catalog"."default", - "always_show" char(1) COLLATE "pg_catalog"."default" + "always_show" bool NOT NULL DEFAULT false ) ; COMMENT ON COLUMN "system_menu"."id" IS '菜单ID'; @@ -4239,7 +4239,7 @@ CREATE TABLE "system_notify_message" ( "template_content" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL, "template_type" int4 NOT NULL, "template_params" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "read_status" varchar(1) COLLATE "pg_catalog"."default" NOT NULL, + "read_status" bool NOT NULL DEFAULT false, "read_time" timestamp(6), "creator" varchar(64) COLLATE "pg_catalog"."default", "create_time" timestamp(6) NOT NULL, From 70b48ca232cd36e55b8d7179e7120ac78c041758 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Mon, 12 Jun 2023 08:32:26 +0000 Subject: [PATCH 10/37] =?UTF-8?q?=E4=BD=BF=E7=94=A8docker=20compose=20-T?= =?UTF-8?q?=E6=9D=A5=E6=89=A7=E8=A1=8C=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dhb52 --- Docker-HOWTO.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Docker-HOWTO.md b/Docker-HOWTO.md index 87b4a4a02..404f5fa4d 100644 --- a/Docker-HOWTO.md +++ b/Docker-HOWTO.md @@ -45,13 +45,11 @@ docker compose --env-file docker.env up -d 第一次执行,由于数据库未初始化,因此yudao-server容器会运行失败。执行如下命令初始化数据库: ```shell -docker exec -i yudao-mysql \ - sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" ruoyi-vue-pro' \ +docker compose exec -T mysql \ + sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" --default-character-set=utf8mb4 ruoyi-vue-pro' \ < ./sql/mysql/ruoyi-vue-pro.sql ``` -注意:这里用docker compose exec 会出现 `the input device is not a TTY` 报错 - ## Server:Port - admin: http://localhost:8080 From df6d63068d9671903908920cc7ffd4d3089ce29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Syriana=E9=92=9F=E4=BA=A8?= <4916681+sairupe@user.noreply.gitee.com> Date: Tue, 13 Jun 2023 08:36:20 +0000 Subject: [PATCH 11/37] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E7=AC=AC1?= =?UTF-8?q?=E7=82=B9=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF=EF=BC=8C=20?= =?UTF-8?q?=E3=80=90=E7=94=A8=E6=88=B7=E7=9C=8B=E5=88=B0=20=E3=80=91?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20=E3=80=90=E7=94=A8=E6=88=B7=E7=9C=8B?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Syriana钟亨 <4916681+sairupe@user.noreply.gitee.com> --- .../datapermission/core/rule/dept/DeptDataPermissionRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRule.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRule.java index ae73963c4..41f03fbe6 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRule.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRule.java @@ -36,7 +36,7 @@ import java.util.Set; * 注意,使用 DeptDataPermissionRule 时,需要保证表中有 dept_id 部门编号的字段,可自定义。 * * 实际业务场景下,会存在一个经典的问题?当用户修改部门时,冗余的 dept_id 是否需要修改? - * 1. 一般情况下,dept_id 不进行修改,则会导致用户看到之前的数据。【yudao-server 采用该方案】 + * 1. 一般情况下,dept_id 不进行修改,则会导致用户看不到之前的数据。【yudao-server 采用该方案】 * 2. 部分情况下,希望该用户还是能看到之前的数据,则有两种方式解决:【需要你改造该 DeptDataPermissionRule 的实现代码】 * 1)编写洗数据的脚本,将 dept_id 修改成新部门的编号;【建议】 * 最终过滤条件是 WHERE dept_id = ? From ae8397422a0f194c3516670980aa08d69976c7d2 Mon Sep 17 00:00:00 2001 From: Zhe Date: Wed, 14 Jun 2023 16:16:56 +0800 Subject: [PATCH 12/37] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPG=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E9=83=A8=E5=88=86=E5=AD=97=E5=85=B8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=EF=BC=9B=E4=BF=AE=E5=A4=8D=E5=9B=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=97=A0=E9=BB=98=E8=AE=A4=E5=80=BC=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=90=E8=A1=8C=E7=94=9F=E6=88=90SQL?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index c9cafc642..a88550144 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -2405,6 +2405,10 @@ INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "st INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1158, 3, 'implicit', 'implicit', 'system_oauth2_grant_type', 0, 'success', '', '简化模式', '1', '2022-05-12 00:23:40', '1', '2022-05-11 16:26:05', 0); INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1159, 4, 'client_credentials', 'client_credentials', 'system_oauth2_grant_type', 0, 'default', '', '客户端模式', '1', '2022-05-12 00:23:51', '1', '2022-05-11 16:26:08', 0); INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1160, 5, 'refresh_token', 'refresh_token', 'system_oauth2_grant_type', 0, 'info', '', '刷新模式', '1', '2022-05-12 00:24:02', '1', '2022-05-11 16:26:11', 0); +INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1161, 4, 'Vue 3 Vben', '30', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-06-14 15:24:37.447', '1', '2023-06-14 15:24:37.447', 0); +INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1162, 3, 'Vue 3 Schema', '21', 'infra_codegen_front_type', 0, '', '', 'Vue 3 Element Plus Schema', '1', '2023-06-14 15:24:18.714', '1', '2023-06-14 15:36:40.317', 0); +INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1163, 2, 'Vue 3', '20', 'infra_codegen_front_type', 0, '', '', 'Vue 3 Element Plus', '1', '2023-06-14 15:24:05.654', '1', '2023-06-14 15:24:05.654', 0); +INSERT INTO "system_dict_data" ("id", "sort", "label", "value", "dict_type", "status", "color_type", "css_class", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1164, 1, 'Vue 2', '10', 'infra_codegen_front_type', 0, '', '', 'Vue 2', '1', '2023-06-14 15:23:12.211', '1', '2023-06-14 15:23:57.816', 0); COMMIT; -- ---------------------------- @@ -2500,6 +2504,7 @@ INSERT INTO "system_dict_type" ("id", "name", "type", "status", "remark", "creat INSERT INTO "system_dict_type" ("id", "name", "type", "status", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (145, '角色类型', 'system_role_type', 0, '角色类型', '1', '2022-02-16 13:01:46', '1', '2022-02-16 13:01:46', 0); INSERT INTO "system_dict_type" ("id", "name", "type", "status", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (146, '文件存储器', 'infra_file_storage', 0, '文件存储器', '1', '2022-03-15 00:24:38', '1', '2022-03-15 00:24:38', 0); INSERT INTO "system_dict_type" ("id", "name", "type", "status", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (147, 'OAuth 2.0 授权类型', 'system_oauth2_grant_type', 0, 'OAuth 2.0 授权类型(模式)', '1', '2022-05-12 00:20:52', '1', '2022-05-11 16:25:49', 0); +INSERT INTO "system_dict_type" ("id", "name", "type", "status", "remark", "creator", "create_time", "updater", "update_time", "deleted") VALUES (148, '生成前端代码类型', 'infra_codegen_front_type', 0, '生成前端代码类型', '1', '2023-6-14 16:07:35', '1', '2023-6-14 16:07:39', 0); COMMIT; -- ---------------------------- @@ -2589,7 +2594,7 @@ COMMIT; -- ---------------------------- DROP TABLE IF EXISTS "system_menu"; CREATE TABLE "system_menu" ( - "id" int8 NOT NULL, + "id" int8 NOT NULL DEFAULT nextval('system_menu_seq'::regclass), "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "permission" varchar(100) COLLATE "pg_catalog"."default" NOT NULL, "type" int2 NOT NULL, @@ -2599,12 +2604,12 @@ CREATE TABLE "system_menu" ( "icon" varchar(100) COLLATE "pg_catalog"."default", "component" varchar(255) COLLATE "pg_catalog"."default", "status" int2 NOT NULL, - "visible" bool NOT NULL, - "keep_alive" bool NOT NULL, + "visible" bool NOT NULL DEFAULT true, + "keep_alive" bool NOT NULL DEFAULT false, "creator" varchar(64) COLLATE "pg_catalog"."default", - "create_time" timestamp(6) NOT NULL, + "create_time" timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), "updater" varchar(64) COLLATE "pg_catalog"."default", - "update_time" timestamp(6) NOT NULL, + "update_time" timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), "deleted" int2 NOT NULL DEFAULT 0, "component_name" varchar(255) COLLATE "pg_catalog"."default", "always_show" char(1) COLLATE "pg_catalog"."default" From 4953d5ec62ed5b82c1453497c1a615d1f9ded869 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 16:24:10 +0800 Subject: [PATCH 13/37] fix: vben codegen radio type --- .../src/main/resources/codegen/vue3_vben/views/data.ts.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index 0724d5c57..6f0c01d80 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -122,7 +122,7 @@ export const createFormSchema: FormSchema[] = [ #end } #elseif($column.htmlType == "radio")## 单选框 - component: 'Radio', + component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') @@ -188,7 +188,7 @@ export const updateFormSchema: FormSchema[] = [ #end } #elseif($column.htmlType == "radio")## 单选框 - component: 'Radio', + component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') From cd33f68e2badbf3149577f8a4317a55bec2fea26 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 16:50:46 +0800 Subject: [PATCH 14/37] chore: up springboot 2.10.12 --- README.md | 2 +- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- .../yudao-sso-demo-by-password/pom.xml | 2 +- yudao-server/pom.xml | 2 +- .../src/main/resources/application-local.yaml | 22 +++++++++---------- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4feb387d2..e2eb27acd 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | 学习指南 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.11 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | diff --git a/pom.xml b/pom.xml index dcaa35c12..4f1350a10 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.8.1 1.18.26 - 2.7.11 + 2.7.12 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index b34b01f63..46020dc58 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,7 +16,7 @@ 1.7.3-snapshot - 2.7.11 + 2.7.12 1.6.15 4.1.0 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index e49b573a2..d3f745dba 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.11 + 2.7.12 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index 556d2b6c3..d6e73916d 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.11 + 2.7.12 diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 143642226..fdfa88415 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -111,7 +111,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.7.11 + 2.7.12 true diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index cdc1d3fde..a06bcdd6c 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -44,34 +44,34 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 - username: root - password: 123456 + username: dev + password: Dev@sd123 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 - username: root - password: 123456 + username: dev + password: Dev@sd123 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 127.0.0.1 # 地址 + host: 192.168.0.11 # 地址 port: 6379 # 端口 - database: 0 # 数据库索引 -# password: dev # 密码,建议生产环境开启 + database: 9 # 数据库索引 +# password: MyNewPass@123 # 密码,建议生产环境开启 --- #################### 定时任务相关配置 #################### From 66f09ed54bc4d53071d6b1d7ca3d6d292c216110 Mon Sep 17 00:00:00 2001 From: sunyuqiang <1129921824@qq.com> Date: Wed, 14 Jun 2023 17:19:50 +0800 Subject: [PATCH 15/37] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E5=85=AC=E4=BC=97?= =?UTF-8?q?=E5=8F=B7=E6=A0=87=E7=AD=BE=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E2=80=9C[=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7=20yudao-module-mp=20-=20=E5=B7=B2=E7=A6=81?= =?UTF-8?q?=E7=94=A8][=E5=8F=82=E8=80=83=20https://doc.iocoder.cn/mp/build?= =?UTF-8?q?/=20=E5=BC=80=E5=90=AF]=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/mp/controller/admin/tag/MpTagController.java | 8 ++++++++ .../iocoder/yudao/module/mp/service/tag/MpTagService.java | 7 +++++++ .../yudao/module/mp/service/tag/MpTagServiceImpl.java | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java index d7237d282..7b84e59eb 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java @@ -52,6 +52,14 @@ public class MpTagController { return success(true); } + @GetMapping("/get") + @Operation(summary = "获取公众号标签详情") + @PreAuthorize("@ss.hasPermission('mp:tag:query')") + public CommonResult get(@RequestParam("id") Long id) { + MpTagDO mpTagDO = mpTagService.get(id); + return success(mpTagDO); + } + @GetMapping("/page") @Operation(summary = "获取公众号标签分页") @PreAuthorize("@ss.hasPermission('mp:tag:query')") diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagService.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagService.java index 44dcfb0a9..77dbf338f 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagService.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagService.java @@ -46,6 +46,13 @@ public interface MpTagService { */ PageResult getTagPage(MpTagPageReqVO pageReqVO); + /** + * 获得公众号标签详情 + * @param id id查询 + * @return 公众号标签详情 + */ + MpTagDO get(Long id); + List getTagList(); /** diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagServiceImpl.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagServiceImpl.java index e3b0074d9..a4fa50923 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagServiceImpl.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagServiceImpl.java @@ -116,6 +116,11 @@ public class MpTagServiceImpl implements MpTagService { return mpTagMapper.selectPage(pageReqVO); } + @Override + public MpTagDO get(Long id) { + return mpTagMapper.selectById(id); + } + @Override public List getTagList() { return mpTagMapper.selectList(); From 296256a55a2c97510f7c719b523e806592e0a6b5 Mon Sep 17 00:00:00 2001 From: sunyuqiang <1129921824@qq.com> Date: Wed, 14 Jun 2023 17:30:15 +0800 Subject: [PATCH 16/37] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E5=85=AC=E4=BC=97?= =?UTF-8?q?=E5=8F=B7=E6=A0=87=E7=AD=BE=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E2=80=9C[=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7=20yudao-module-mp=20-=20=E5=B7=B2=E7=A6=81?= =?UTF-8?q?=E7=94=A8][=E5=8F=82=E8=80=83=20https://doc.iocoder.cn/mp/build?= =?UTF-8?q?/=20=E5=BC=80=E5=90=AF]=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/mp/controller/admin/tag/MpTagController.java | 4 ++-- .../cn/iocoder/yudao/module/mp/convert/tag/MpTagConvert.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java index 7b84e59eb..96af036dc 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/tag/MpTagController.java @@ -55,9 +55,9 @@ public class MpTagController { @GetMapping("/get") @Operation(summary = "获取公众号标签详情") @PreAuthorize("@ss.hasPermission('mp:tag:query')") - public CommonResult get(@RequestParam("id") Long id) { + public CommonResult get(@RequestParam("id") Long id) { MpTagDO mpTagDO = mpTagService.get(id); - return success(mpTagDO); + return success(MpTagConvert.INSTANCE.convert(mpTagDO)); } @GetMapping("/page") diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/tag/MpTagConvert.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/tag/MpTagConvert.java index 726291fac..727ccd314 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/tag/MpTagConvert.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/tag/MpTagConvert.java @@ -37,6 +37,8 @@ public interface MpTagConvert { }) MpTagDO convert(WxUserTag tag, MpAccountDO account); + MpTagRespVO convert(MpTagDO mpTagDO); + List convertList02(List list); } From 25df1e2ecd9f55e04eb71a2907f24166580e9a3e Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 17:58:51 +0800 Subject: [PATCH 17/37] revert: config --- .../src/main/resources/application-local.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index a06bcdd6c..cdc1d3fde 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -44,34 +44,34 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro-dev - url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 - username: dev - password: Dev@sd123 + username: root + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro-dev - url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 - username: dev - password: Dev@sd123 + username: root + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 192.168.0.11 # 地址 + host: 127.0.0.1 # 地址 port: 6379 # 端口 - database: 9 # 数据库索引 -# password: MyNewPass@123 # 密码,建议生产环境开启 + database: 0 # 数据库索引 +# password: dev # 密码,建议生产环境开启 --- #################### 定时任务相关配置 #################### From b892a6d2bd21fbd54863880b557922e445202ab7 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 18:00:14 +0800 Subject: [PATCH 18/37] feat: captcha-plus 1.0.4 --- yudao-dependencies/pom.xml | 4 ++-- .../config/YudaoCaptchaConfiguration.java | 16 ++++++++++++++-- .../core/service/RedisCaptchaServiceImpl.java | 4 ++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 46020dc58..dad575867 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.2 + 1.0.4 1.15.4 1.18.26 1.5.5.Final @@ -67,7 +67,7 @@ 8.5.2 4.6.3 2.2.1 - 3.1.715 + 3.1.758 1.4.0 1.5.6 2.12.2 diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java index 2a690d800..32d2b4b87 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java @@ -3,11 +3,15 @@ package cn.iocoder.yudao.framework.captcha.config; import cn.hutool.core.util.ClassUtil; import cn.iocoder.yudao.framework.captcha.core.enums.CaptchaRedisKeyConstants; import cn.iocoder.yudao.framework.captcha.core.service.RedisCaptchaServiceImpl; +import com.xingyuv.captcha.properties.AjCaptchaProperties; import com.xingyuv.captcha.service.CaptchaCacheService; +import com.xingyuv.captcha.service.impl.CaptchaServiceFactory; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.core.StringRedisTemplate; +import javax.annotation.Resource; + @AutoConfiguration public class YudaoCaptchaConfiguration { @@ -17,9 +21,17 @@ public class YudaoCaptchaConfiguration { ClassUtil.loadClass(CaptchaRedisKeyConstants.class.getName()); } + @Resource + private StringRedisTemplate stringRedisTemplate; + @Bean - public CaptchaCacheService captchaCacheService(StringRedisTemplate stringRedisTemplate) { - return new RedisCaptchaServiceImpl(stringRedisTemplate); + public CaptchaCacheService captchaCacheService(AjCaptchaProperties config) { + //缓存类型redis/local/.... + CaptchaCacheService ret = CaptchaServiceFactory.getCache(config.getCacheType().name()); + if(ret instanceof RedisCaptchaServiceImpl){ + ((RedisCaptchaServiceImpl)ret).setStringRedisTemplate(stringRedisTemplate); + } + return ret; } } diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java index 1429c47c2..95c9ec4af 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java @@ -25,6 +25,10 @@ public class RedisCaptchaServiceImpl implements CaptchaCacheService { return "redis"; } + public void setStringRedisTemplate(StringRedisTemplate stringRedisTemplate) { + this.stringRedisTemplate = stringRedisTemplate; + } + @Override public void set(String key, String value, long expiresInSeconds) { stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS); From 749fe9d515c321b643c66feb8bac852e282bc1a5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 12:19:46 +0800 Subject: [PATCH 19/37] =?UTF-8?q?=E5=9B=9E=E9=80=80=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E5=88=B0=201.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 2 +- .../framework/captcha/config/YudaoCaptchaConfiguration.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index dad575867..d89daaa2a 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.4 + 1.0.2 1.15.4 1.18.26 1.5.5.Final diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java index 32d2b4b87..a73c82bf0 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java @@ -26,9 +26,9 @@ public class YudaoCaptchaConfiguration { @Bean public CaptchaCacheService captchaCacheService(AjCaptchaProperties config) { - //缓存类型redis/local/.... + // 缓存类型 redis/local/.... CaptchaCacheService ret = CaptchaServiceFactory.getCache(config.getCacheType().name()); - if(ret instanceof RedisCaptchaServiceImpl){ + if (ret instanceof RedisCaptchaServiceImpl) { ((RedisCaptchaServiceImpl)ret).setStringRedisTemplate(stringRedisTemplate); } return ret; From 16dd86a8db0f44a149b8b36b2784d1b28fcd3463 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 12:36:13 +0800 Subject: [PATCH 20/37] =?UTF-8?q?498=20=E8=A7=A3=E5=86=B3=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=20Set=20access=20token=20expire=20time=20to=200=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=E5=92=8C=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E7=94=A8=E6=88=B7=E7=BC=96=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/captcha/config/YudaoCaptchaConfiguration.java | 2 +- .../controller/admin/mail/MailTemplateController.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java index a73c82bf0..057445519 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java @@ -29,7 +29,7 @@ public class YudaoCaptchaConfiguration { // 缓存类型 redis/local/.... CaptchaCacheService ret = CaptchaServiceFactory.getCache(config.getCacheType().name()); if (ret instanceof RedisCaptchaServiceImpl) { - ((RedisCaptchaServiceImpl)ret).setStringRedisTemplate(stringRedisTemplate); + ((RedisCaptchaServiceImpl) ret).setStringRedisTemplate(stringRedisTemplate); } return ret; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java index a2037d8c5..d41732278 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java @@ -2,8 +2,6 @@ package cn.iocoder.yudao.module.system.controller.admin.mail; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.security.core.LoginUser; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*; import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; @@ -20,6 +18,7 @@ import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Tag(name = "管理后台 - 邮件模版") @RestController @@ -83,8 +82,7 @@ public class MailTemplateController { @Operation(summary = "发送短信") @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')") public CommonResult sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) { - LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); - return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), loginUser != null ? loginUser.getId() : null, + return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), getLoginUserId(), sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } From ecfe0b864b19671c15a384c3085e095e563cb874 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 12:41:56 +0800 Subject: [PATCH 21/37] =?UTF-8?q?=E4=BC=98=E5=8C=96=20RedisPendingMessageR?= =?UTF-8?q?esendJob=20=E4=BB=A3=E7=A0=81=E6=8E=92=E7=89=88=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mq/job/RedisPendingMessageResendJob.java | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java index 689fd2931..ea0f53d19 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/job/RedisPendingMessageResendJob.java @@ -25,17 +25,18 @@ public class RedisPendingMessageResendJob { private static final String LOCK_KEY = "redis:pending:msg:lock"; + /** + * 消息超时时间,默认 5 分钟 + * + * 1. 超时的消息才会被重新投递 + * 2. 由于定时任务 1 分钟一次,消息超时后不会被立即重投,极端情况下消息5分钟过期后,再等 1 分钟才会被扫瞄到 + */ + private static final int EXPIRE_TIME = 5 * 60; + private final List> listeners; private final RedisMQTemplate redisTemplate; private final String groupName; private final RedissonClient redissonClient; - /** - * 消息超时时间,默认5分钟 - *

超时的消息才会被重新投递

- *

由于定时任务1分钟一次,消息超时后不会被立即重投, - * 极端情况下消息5分钟过期后,再等1分钟才会被扫瞄到

- */ - private final long expireTime = 5 * 60; /** * 一分钟执行一次,这里选择每分钟的35秒执行,是为了避免整点任务过多的问题 @@ -55,6 +56,11 @@ public class RedisPendingMessageResendJob { } } + /** + * 执行清理逻辑 + * + * @see 讨论 + */ private void execute() { StreamOperations ops = redisTemplate.getRedisTemplate().opsForStream(); listeners.forEach(listener -> { @@ -65,28 +71,29 @@ public class RedisPendingMessageResendJob { log.info("[processPendingMessage][消费者({}) 消息数量({})]", consumerName, pendingMessageCount); // 每个消费者的 pending消息的详情信息 PendingMessages pendingMessages = ops.pending(listener.getStreamKey(), Consumer.from(groupName, consumerName), Range.unbounded(), pendingMessageCount); - if(pendingMessages.isEmpty()){ + if (pendingMessages.isEmpty()) { return; } - for (PendingMessage pendingMessage : pendingMessages) { + pendingMessages.forEach(pendingMessage -> { // 获取消息上一次传递到 consumer 的时间, long lastDelivery = pendingMessage.getElapsedTimeSinceLastDelivery().getSeconds(); - if(lastDelivery < expireTime){ - continue; + if (lastDelivery < EXPIRE_TIME){ + return; } - // 获取指定id的消息体 - List> records = ops.range(listener.getStreamKey(), Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString()))); - if(CollUtil.isEmpty(records)){ - continue; + // 获取指定 id 的消息体 + List> records = ops.range(listener.getStreamKey(), + Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString()))); + if (CollUtil.isEmpty(records)) { + return; } // 重新投递消息 redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord() - .ofObject(records.get(0).getValue()) // 设置内容 - .withStreamKey(listener.getStreamKey())); + .ofObject(records.get(0).getValue()) // 设置内容 + .withStreamKey(listener.getStreamKey())); // ack 消息消费完成 redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0)); log.info("[processPendingMessage][消息({})重新投递成功]", records.get(0).getId()); - } + }); }); }); } From c7e3a8c126a5077943f1edf5c1497f442e65373b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 13:58:55 +0800 Subject: [PATCH 22/37] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Vue=202=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=8E=AF=E5=A2=83=E6=89=93=E5=8C=85=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E7=AD=89=E9=85=8D=E7=BD=AE=E6=9C=AA=E7=94=9F=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/.env.prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-ui-admin/.env.prod b/yudao-ui-admin/.env.prod index a1415ed39..511b91ba9 100644 --- a/yudao-ui-admin/.env.prod +++ b/yudao-ui-admin/.env.prod @@ -1,5 +1,5 @@ # 生产环境配置 -ENV = 'production' +NODE_ENV = 'production' # 页面标题 VUE_APP_TITLE = 芋道管理系统 From a4c11b890c1ec456be4673e1669342cad5db7d4a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 14:17:24 +0800 Subject: [PATCH 23/37] fix(sec): upgrade commons-net:commons-net to #98 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index d89daaa2a..b6851a2a3 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -55,7 +55,7 @@ 31.1-jre 5.1.0 2.14.2 - 3.8.0 + 3.9.0 0.1.55 2.7.0 4.1.90.Final From 8d58b1e862ef789e2cfe830bc06196531bd1e028 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 14:19:26 +0800 Subject: [PATCH 24/37] Bump guava from 31.1-jre to 32.0.0-jre in /yudao-dependencies #96 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index b6851a2a3..0ca928387 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -52,7 +52,7 @@ 2.3 1.0.5 1.2.83 - 31.1-jre + 32.0.0-jre 5.1.0 2.14.2 3.9.0 From 850d028ec76c22604dce3838b6ef45264680a636 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 19 Jun 2023 09:47:01 +0800 Subject: [PATCH 25/37] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E5=8D=8E?= =?UTF-8?q?=E4=B8=BA=E4=BA=91maven=20aliyun=E5=90=8C=E6=AD=A5=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f1350a10..932c206d0 100644 --- a/pom.xml +++ b/pom.xml @@ -96,8 +96,13 @@ - + + + huaweicloud + huawei + https://mirrors.huaweicloud.com/repository/maven/ + aliyunmaven aliyun From 7fc1016e903a68637981db4a3b109771aed95132 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 19 Jun 2023 09:47:18 +0800 Subject: [PATCH 26/37] chore: up captcha-plus 1.0.4 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0ca928387..ebbe54574 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.2 + 1.0.4 1.15.4 1.18.26 1.5.5.Final From bdb18b4cedd11daa84c4a2db9c8c93f28b2917e8 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:26:38 +0800 Subject: [PATCH 27/37] chore: up springboot 2.7.13 --- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-password/pom.xml | 2 +- yudao-server/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 932c206d0..ac9d96dc0 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.8.1 1.18.26 - 2.7.12 + 2.7.13 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index ebbe54574..62e86a0d1 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,7 +16,7 @@ 1.7.3-snapshot - 2.7.12 + 2.7.13 1.6.15 4.1.0 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index d3f745dba..bde80276b 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.12 + 2.7.13 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index d6e73916d..8b81b87d6 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.12 + 2.7.13 diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index fdfa88415..25539cb63 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -111,7 +111,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.7.12 + 2.7.13 true From 0899f5fd29819962b5d57f66c9c0eaf0ea35c443 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:27:06 +0800 Subject: [PATCH 28/37] docs: up springboot 2.10.12 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2eb27acd..36e5bfc39 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | 学习指南 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | From 02fe0329e41461869ed35c4312d5a2bf25201a99 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:29:26 +0800 Subject: [PATCH 29/37] chore: up druid 1.2.18 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 62e86a0d1..dae6b252a 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -22,7 +22,7 @@ 4.1.0 2.5 - 1.2.16 + 1.2.18 3.5.3.1 3.5.3.1 3.6.1 From 4393c5da1cfcc941210fe1fee61b79465920edf3 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:30:00 +0800 Subject: [PATCH 30/37] docs: up Druid 1.2.18 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36e5bfc39..7a061e8ac 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ ps:核心功能已经实现,正在对接微信小程序中... |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| | [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | -| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | +| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | | From d44c29296d3060d6226965c907ae11cd0e4ac15c Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:49:33 +0800 Subject: [PATCH 31/37] chore: up hutool 5.8.20 Lombok 1.18.28 --- pom.xml | 2 +- yudao-dependencies/pom.xml | 6 +++--- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-password/pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ac9d96dc0..d221cb4f4 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 3.0.0-M5 3.8.1 - 1.18.26 + 1.18.28 2.7.13 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index dae6b252a..0b75bd74c 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -45,10 +45,10 @@ 1.0.4 1.15.4 - 1.18.26 + 1.18.28 1.5.5.Final - 5.8.18 - 3.3.1 + 5.8.20 + 3.3.2 2.3 1.0.5 1.2.83 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index bde80276b..dc0c0241e 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.18 + 5.8.20 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index 8b81b87d6..ee5d05390 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.18 + 5.8.20 From c1782c432fbbd9720adeba2fd73886040db273fb Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:50:20 +0800 Subject: [PATCH 32/37] chore: up deps version --- yudao-dependencies/pom.xml | 10 +++++----- .../yudao-spring-boot-starter-biz-pay/pom.xml | 2 +- .../yudao-spring-boot-starter-biz-weixin/pom.xml | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0b75bd74c..48deffc03 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -26,7 +26,7 @@ 3.5.3.1 3.5.3.1 3.6.1 - 1.4.3.2 + 1.4.5 3.18.0 8.1.2.141 @@ -52,7 +52,7 @@ 2.3 1.0.5 1.2.83 - 32.0.0-jre + 32.0.1-jre 5.1.0 2.14.2 3.9.0 @@ -64,14 +64,14 @@ 3.0.0 4.10.0 2.11.0 - 8.5.2 + 8.5.4 4.6.3 2.2.1 3.1.758 1.4.0 - 1.5.6 + 1.5.8 2.12.2 - 4.3.0 + 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml index 2ccbc7ba2..3effb1952 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml @@ -63,7 +63,7 @@ com.github.binarywang weixin-java-pay - 4.4.0 + 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml index 2dc37c376..e242819ef 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml @@ -34,14 +34,13 @@ com.github.binarywang - wx-java-mp-spring-boot-starter - 4.4.0 + 4.5.0 com.github.binarywang wx-java-miniapp-spring-boot-starter - 4.4.0 + 4.5.0 From 9826bd614baf4f12283c75acbe528678d1af3a28 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:50:41 +0800 Subject: [PATCH 33/37] docs: up Lombok 1.18.28 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a061e8ac..445e50014 100644 --- a/README.md +++ b/README.md @@ -267,7 +267,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | | | [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | -| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.26 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | +| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.28 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - | | [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.8.0 | - | From 8ea46b8fc21b6ffa9c4ab973e2cd6a6b03ec8624 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:53:08 +0800 Subject: [PATCH 34/37] =?UTF-8?q?fix:=20getNewPhoneNoInfo=20=E5=B7=B2?= =?UTF-8?q?=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/member/service/auth/MemberAuthServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java index d8c59ad37..58b637c6d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java @@ -127,7 +127,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { // 获得对应的手机号信息 WxMaPhoneNumberInfo phoneNumberInfo; try { - phoneNumberInfo = wxMaService.getUserService().getNewPhoneNoInfo(reqVO.getPhoneCode()); + phoneNumberInfo = wxMaService.getUserService().getPhoneNoInfo(reqVO.getPhoneCode()); } catch (Exception exception) { throw exception(AUTH_WEIXIN_MINI_APP_PHONE_CODE_ERROR); } From 7ad3b6ad2b1745ec3f6b1a01bcd2a6cf6b307442 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 21:08:56 +0800 Subject: [PATCH 35/37] chore: use com.xingyuv.justauth --- yudao-dependencies/pom.xml | 6 +++--- .../pom.xml | 4 ++-- .../config/YudaoSocialAutoConfiguration.java | 4 ++-- .../social/core/YudaoAuthRequestFactory.java | 12 +++++------ .../social/core/enums/AuthExtendSource.java | 10 ++++++++-- .../request/AuthWeChatMiniAppRequest.java | 20 +++++++++---------- .../service/social/SocialUserServiceImpl.java | 10 +++++----- .../social/SocialUserServiceImplTest.java | 12 +++++------ 8 files changed, 42 insertions(+), 36 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 48deffc03..a5ba9332b 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -68,7 +68,7 @@ 4.6.3 2.2.1 3.1.758 - 1.4.0 + 1.0.0 1.5.8 2.12.2 4.5.0 @@ -589,8 +589,8 @@ - com.xkcoding.justauth - justauth-spring-boot-starter + com.xingyuv + spring-boot-starter-justauth ${justauth.version} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml index 0e0ac6dc4..e39107918 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml @@ -36,8 +36,8 @@ - com.xkcoding.justauth - justauth-spring-boot-starter + com.xingyuv + spring-boot-starter-justauth cn.hutool diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 5c2f7f8bb..1812efeb9 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.framework.social.config; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.justauth.autoconfigure.JustAuthProperties; import com.xkcoding.http.HttpUtil; import com.xkcoding.http.support.hutool.HutoolImpl; -import com.xkcoding.justauth.autoconfigure.JustAuthProperties; import lombok.extern.slf4j.Slf4j; -import me.zhyd.oauth.cache.AuthStateCache; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java index 22be344d9..5d5475e84 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java @@ -4,12 +4,12 @@ import cn.hutool.core.util.EnumUtil; import cn.hutool.core.util.ReflectUtil; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import cn.iocoder.yudao.framework.social.core.request.AuthWeChatMiniAppRequest; -import com.xkcoding.justauth.AuthRequestFactory; -import com.xkcoding.justauth.autoconfigure.JustAuthProperties; -import me.zhyd.oauth.cache.AuthStateCache; -import me.zhyd.oauth.config.AuthConfig; -import me.zhyd.oauth.config.AuthSource; -import me.zhyd.oauth.request.AuthRequest; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.jushauth.config.AuthConfig; +import com.xingyuv.jushauth.config.AuthSource; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.justauth.AuthRequestFactory; +import com.xingyuv.justauth.autoconfigure.JustAuthProperties; import java.lang.reflect.Method; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java index f51c81e02..fd0fff709 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java @@ -1,11 +1,12 @@ package cn.iocoder.yudao.framework.social.core.enums; -import me.zhyd.oauth.config.AuthSource; +import com.xingyuv.jushauth.config.AuthSource; +import com.xingyuv.jushauth.request.AuthDefaultRequest; /** * 拓展 JustAuth 各 api 需要的 url, 用枚举类分平台类型管理 * - * 默认配置 {@link me.zhyd.oauth.config.AuthDefaultSource} + * 默认配置 {@link com.xingyuv.jushauth.config.AuthDefaultSource} * * @author timfruit */ @@ -34,6 +35,11 @@ public enum AuthExtendSource implements AuthSource { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档 throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息"); } + + @Override + public Class getTargetClass() { + return null; + } } } diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java index 5ff5b8578..2e98ac989 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java @@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.social.core.request; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import com.fasterxml.jackson.annotation.JsonProperty; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.jushauth.config.AuthConfig; +import com.xingyuv.jushauth.exception.AuthException; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthToken; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthDefaultRequest; +import com.xingyuv.jushauth.utils.HttpUtils; +import com.xingyuv.jushauth.utils.UrlBuilder; import lombok.Data; -import me.zhyd.oauth.cache.AuthStateCache; -import me.zhyd.oauth.config.AuthConfig; -import me.zhyd.oauth.exception.AuthException; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthToken; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthDefaultRequest; -import me.zhyd.oauth.utils.HttpUtils; -import me.zhyd.oauth.utils.UrlBuilder; /** * 微信小程序登陆 Request 请求 @@ -32,7 +32,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { protected AuthToken getAccessToken(AuthCallback authCallback) { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档 // 使用 code 获取对应的 openId、unionId 等字段 - String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())); + String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())).getBody(); JSCode2SessionResponse accessTokenObject = JsonUtils.parseObject(response, JSCode2SessionResponse.class); assert accessTokenObject != null; checkResponse(accessTokenObject); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java index 411d749b0..b6999bd01 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java @@ -10,12 +10,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthResponse; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.jushauth.utils.AuthStateUtils; import lombok.extern.slf4j.Slf4j; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthResponse; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthRequest; -import me.zhyd.oauth.utils.AuthStateUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java index 48f914a1a..c4f0442a2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java @@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import me.zhyd.oauth.enums.AuthResponseStatus; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthResponse; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthRequest; -import me.zhyd.oauth.utils.AuthStateUtils; +import com.xingyuv.jushauth.enums.AuthResponseStatus; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthResponse; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.jushauth.utils.AuthStateUtils; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.springframework.boot.test.mock.mockito.MockBean; From 3e9768374b82063112a2b33a1dd11ce2ff1048e1 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 22:19:20 +0800 Subject: [PATCH 36/37] chore: up justauth 1.0.1 captcha-plus 1.0.5 --- yudao-dependencies/pom.xml | 4 ++-- .../framework/social/config/YudaoSocialAutoConfiguration.java | 4 ++-- .../social/core/request/AuthWeChatMiniAppRequest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index a5ba9332b..1b9f8301a 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.4 + 1.0.5 1.15.4 1.18.28 1.5.5.Final @@ -68,7 +68,7 @@ 4.6.3 2.2.1 3.1.758 - 1.0.0 + 1.0.1 1.5.8 2.12.2 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 1812efeb9..3dc6b6a9a 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.social.config; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; +import com.xingyuv.http.HttpUtil; +import com.xingyuv.http.support.hutool.HutoolImpl; import com.xingyuv.jushauth.cache.AuthStateCache; import com.xingyuv.justauth.autoconfigure.JustAuthProperties; -import com.xkcoding.http.HttpUtil; -import com.xkcoding.http.support.hutool.HutoolImpl; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java index 2e98ac989..964eb31cd 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java @@ -73,7 +73,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { return UrlBuilder.fromBaseUrl(source.accessToken()) .queryParam("appid", config.getClientId()) .queryParam("secret", config.getClientSecret()) - .queryParam("js_code", code) // 和父类不同,所以需要重写该方法 + .queryParam("js_code", code) .queryParam("grant_type", "authorization_code") .build(); } From 11c4c950b746fdabd4d2e4f751e1499cf838ac6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=8B=E9=81=93=E6=BA=90=E7=A0=81?= Date: Sun, 2 Jul 2023 15:41:26 +0000 Subject: [PATCH 37/37] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!5?= =?UTF-8?q?18=20:=20=E6=B7=BB=E5=8A=A0=E5=8D=8E=E4=B8=BA=E4=BA=91=20maven?= =?UTF-8?q?=20=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++-- pom.xml | 11 ++------ yudao-dependencies/pom.xml | 28 +++++++++---------- yudao-example/yudao-sso-demo-by-code/pom.xml | 4 +-- .../yudao-sso-demo-by-password/pom.xml | 4 +-- .../yudao-spring-boot-starter-biz-pay/pom.xml | 2 +- .../pom.xml | 4 +-- .../config/YudaoSocialAutoConfiguration.java | 8 +++--- .../social/core/YudaoAuthRequestFactory.java | 12 ++++---- .../social/core/enums/AuthExtendSource.java | 10 ++----- .../request/AuthWeChatMiniAppRequest.java | 22 +++++++-------- .../pom.xml | 5 ++-- .../service/auth/MemberAuthServiceImpl.java | 2 +- .../service/social/SocialUserServiceImpl.java | 10 +++---- .../social/SocialUserServiceImplTest.java | 12 ++++---- yudao-server/pom.xml | 2 +- 16 files changed, 66 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index 445e50014..e2eb27acd 100644 --- a/README.md +++ b/README.md @@ -249,9 +249,9 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | 学习指南 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | -| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | +| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | | @@ -267,7 +267,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | | | [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | -| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.28 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | +| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.26 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - | | [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.8.0 | - | diff --git a/pom.xml b/pom.xml index d221cb4f4..4f1350a10 100644 --- a/pom.xml +++ b/pom.xml @@ -38,8 +38,8 @@ 3.0.0-M5 3.8.1 - 1.18.28 - 2.7.13 + 1.18.26 + 2.7.12 1.5.5.Final UTF-8 @@ -96,13 +96,8 @@ - + - - huaweicloud - huawei - https://mirrors.huaweicloud.com/repository/maven/ - aliyunmaven aliyun diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 1b9f8301a..0ca928387 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,17 +16,17 @@ 1.7.3-snapshot - 2.7.13 + 2.7.12 1.6.15 4.1.0 2.5 - 1.2.18 + 1.2.16 3.5.3.1 3.5.3.1 3.6.1 - 1.4.5 + 1.4.3.2 3.18.0 8.1.2.141 @@ -43,16 +43,16 @@ 6.8.0 - 1.0.5 + 1.0.2 1.15.4 - 1.18.28 + 1.18.26 1.5.5.Final - 5.8.20 - 3.3.2 + 5.8.18 + 3.3.1 2.3 1.0.5 1.2.83 - 32.0.1-jre + 32.0.0-jre 5.1.0 2.14.2 3.9.0 @@ -64,14 +64,14 @@ 3.0.0 4.10.0 2.11.0 - 8.5.4 + 8.5.2 4.6.3 2.2.1 3.1.758 - 1.0.1 - 1.5.8 + 1.4.0 + 1.5.6 2.12.2 - 4.5.0 + 4.3.0 @@ -589,8 +589,8 @@ - com.xingyuv - spring-boot-starter-justauth + com.xkcoding.justauth + justauth-spring-boot-starter ${justauth.version} diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index dc0c0241e..d3f745dba 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.13 + 2.7.12 @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.20 + 5.8.18 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index ee5d05390..d6e73916d 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.13 + 2.7.12 @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.20 + 5.8.18 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml index 3effb1952..2ccbc7ba2 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml @@ -63,7 +63,7 @@ com.github.binarywang weixin-java-pay - 4.5.0 + 4.4.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml index e39107918..0e0ac6dc4 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml @@ -36,8 +36,8 @@ - com.xingyuv - spring-boot-starter-justauth + com.xkcoding.justauth + justauth-spring-boot-starter cn.hutool diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 3dc6b6a9a..5c2f7f8bb 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.framework.social.config; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; -import com.xingyuv.http.HttpUtil; -import com.xingyuv.http.support.hutool.HutoolImpl; -import com.xingyuv.jushauth.cache.AuthStateCache; -import com.xingyuv.justauth.autoconfigure.JustAuthProperties; +import com.xkcoding.http.HttpUtil; +import com.xkcoding.http.support.hutool.HutoolImpl; +import com.xkcoding.justauth.autoconfigure.JustAuthProperties; import lombok.extern.slf4j.Slf4j; +import me.zhyd.oauth.cache.AuthStateCache; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java index 5d5475e84..22be344d9 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java @@ -4,12 +4,12 @@ import cn.hutool.core.util.EnumUtil; import cn.hutool.core.util.ReflectUtil; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import cn.iocoder.yudao.framework.social.core.request.AuthWeChatMiniAppRequest; -import com.xingyuv.jushauth.cache.AuthStateCache; -import com.xingyuv.jushauth.config.AuthConfig; -import com.xingyuv.jushauth.config.AuthSource; -import com.xingyuv.jushauth.request.AuthRequest; -import com.xingyuv.justauth.AuthRequestFactory; -import com.xingyuv.justauth.autoconfigure.JustAuthProperties; +import com.xkcoding.justauth.AuthRequestFactory; +import com.xkcoding.justauth.autoconfigure.JustAuthProperties; +import me.zhyd.oauth.cache.AuthStateCache; +import me.zhyd.oauth.config.AuthConfig; +import me.zhyd.oauth.config.AuthSource; +import me.zhyd.oauth.request.AuthRequest; import java.lang.reflect.Method; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java index fd0fff709..f51c81e02 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.framework.social.core.enums; -import com.xingyuv.jushauth.config.AuthSource; -import com.xingyuv.jushauth.request.AuthDefaultRequest; +import me.zhyd.oauth.config.AuthSource; /** * 拓展 JustAuth 各 api 需要的 url, 用枚举类分平台类型管理 * - * 默认配置 {@link com.xingyuv.jushauth.config.AuthDefaultSource} + * 默认配置 {@link me.zhyd.oauth.config.AuthDefaultSource} * * @author timfruit */ @@ -35,11 +34,6 @@ public enum AuthExtendSource implements AuthSource { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档 throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息"); } - - @Override - public Class getTargetClass() { - return null; - } } } diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java index 964eb31cd..5ff5b8578 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java @@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.social.core.request; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import com.fasterxml.jackson.annotation.JsonProperty; -import com.xingyuv.jushauth.cache.AuthStateCache; -import com.xingyuv.jushauth.config.AuthConfig; -import com.xingyuv.jushauth.exception.AuthException; -import com.xingyuv.jushauth.model.AuthCallback; -import com.xingyuv.jushauth.model.AuthToken; -import com.xingyuv.jushauth.model.AuthUser; -import com.xingyuv.jushauth.request.AuthDefaultRequest; -import com.xingyuv.jushauth.utils.HttpUtils; -import com.xingyuv.jushauth.utils.UrlBuilder; import lombok.Data; +import me.zhyd.oauth.cache.AuthStateCache; +import me.zhyd.oauth.config.AuthConfig; +import me.zhyd.oauth.exception.AuthException; +import me.zhyd.oauth.model.AuthCallback; +import me.zhyd.oauth.model.AuthToken; +import me.zhyd.oauth.model.AuthUser; +import me.zhyd.oauth.request.AuthDefaultRequest; +import me.zhyd.oauth.utils.HttpUtils; +import me.zhyd.oauth.utils.UrlBuilder; /** * 微信小程序登陆 Request 请求 @@ -32,7 +32,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { protected AuthToken getAccessToken(AuthCallback authCallback) { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档 // 使用 code 获取对应的 openId、unionId 等字段 - String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())).getBody(); + String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())); JSCode2SessionResponse accessTokenObject = JsonUtils.parseObject(response, JSCode2SessionResponse.class); assert accessTokenObject != null; checkResponse(accessTokenObject); @@ -73,7 +73,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { return UrlBuilder.fromBaseUrl(source.accessToken()) .queryParam("appid", config.getClientId()) .queryParam("secret", config.getClientSecret()) - .queryParam("js_code", code) + .queryParam("js_code", code) // 和父类不同,所以需要重写该方法 .queryParam("grant_type", "authorization_code") .build(); } diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml index e242819ef..2dc37c376 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml @@ -34,13 +34,14 @@ com.github.binarywang + wx-java-mp-spring-boot-starter - 4.5.0 + 4.4.0 com.github.binarywang wx-java-miniapp-spring-boot-starter - 4.5.0 + 4.4.0 diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java index 58b637c6d..d8c59ad37 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java @@ -127,7 +127,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { // 获得对应的手机号信息 WxMaPhoneNumberInfo phoneNumberInfo; try { - phoneNumberInfo = wxMaService.getUserService().getPhoneNoInfo(reqVO.getPhoneCode()); + phoneNumberInfo = wxMaService.getUserService().getNewPhoneNoInfo(reqVO.getPhoneCode()); } catch (Exception exception) { throw exception(AUTH_WEIXIN_MINI_APP_PHONE_CODE_ERROR); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java index b6999bd01..411d749b0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java @@ -10,12 +10,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import com.xingyuv.jushauth.model.AuthCallback; -import com.xingyuv.jushauth.model.AuthResponse; -import com.xingyuv.jushauth.model.AuthUser; -import com.xingyuv.jushauth.request.AuthRequest; -import com.xingyuv.jushauth.utils.AuthStateUtils; import lombok.extern.slf4j.Slf4j; +import me.zhyd.oauth.model.AuthCallback; +import me.zhyd.oauth.model.AuthResponse; +import me.zhyd.oauth.model.AuthUser; +import me.zhyd.oauth.request.AuthRequest; +import me.zhyd.oauth.utils.AuthStateUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java index c4f0442a2..48f914a1a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java @@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import com.xingyuv.jushauth.enums.AuthResponseStatus; -import com.xingyuv.jushauth.model.AuthCallback; -import com.xingyuv.jushauth.model.AuthResponse; -import com.xingyuv.jushauth.model.AuthUser; -import com.xingyuv.jushauth.request.AuthRequest; -import com.xingyuv.jushauth.utils.AuthStateUtils; +import me.zhyd.oauth.enums.AuthResponseStatus; +import me.zhyd.oauth.model.AuthCallback; +import me.zhyd.oauth.model.AuthResponse; +import me.zhyd.oauth.model.AuthUser; +import me.zhyd.oauth.request.AuthRequest; +import me.zhyd.oauth.utils.AuthStateUtils; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 25539cb63..fdfa88415 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -111,7 +111,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.7.13 + 2.7.12 true