Commit 23e3c4d0d94635f2e97ebfe302787d52c25a9be8

Authored by YunaiV
2 parents 040a6696 08e9772f

Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/mall_product

Showing 20 changed files with 111 additions and 47 deletions
Docker-HOWTO.md
... ... @@ -45,13 +45,11 @@ docker compose --env-file docker.env up -d
45 45 第一次执行,由于数据库未初始化,因此yudao-server容器会运行失败。执行如下命令初始化数据库:
46 46  
47 47 ```shell
48   -docker exec -i yudao-mysql \
49   - sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" ruoyi-vue-pro' \
  48 +docker compose exec -T mysql \
  49 + sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" --default-character-set=utf8mb4 ruoyi-vue-pro' \
50 50 < ./sql/mysql/ruoyi-vue-pro.sql
51 51 ```
52 52  
53   -注意:这里用docker compose exec 会出现 `the input device is not a TTY` 报错
54   -
55 53 ## Server:Port
56 54  
57 55 - admin: http://localhost:8080
... ...
README.md
... ... @@ -249,7 +249,7 @@ ps:核心功能已经实现,正在对接微信小程序中...
249 249  
250 250 | 框架 | 说明 | 版本 | 学习指南 |
251 251 |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------|
252   -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.11 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
  252 +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
253 253 | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
254 254 | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
255 255 | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
... ...
... ... @@ -39,7 +39,7 @@
39 39 <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
40 40 <!-- 看看咋放到 bom 里 -->
41 41 <lombok.version>1.18.26</lombok.version>
42   - <spring.boot.version>2.7.11</spring.boot.version>
  42 + <spring.boot.version>2.7.12</spring.boot.version>
43 43 <mapstruct.version>1.5.5.Final</mapstruct.version>
44 44 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45 45 </properties>
... ...
sql/postgresql/ruoyi-vue-pro.sql
... ... @@ -2405,6 +2405,10 @@ INSERT INTO &quot;system_dict_data&quot; (&quot;id&quot;, &quot;sort&quot;, &quot;label&quot;, &quot;value&quot;, &quot;dict_type&quot;, &quot;st
2405 2405 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);
2406 2406 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);
2407 2407 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);
  2408 +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);
  2409 +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);
  2410 +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);
  2411 +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);
2408 2412 COMMIT;
2409 2413  
2410 2414 -- ----------------------------
... ... @@ -2500,6 +2504,7 @@ INSERT INTO &quot;system_dict_type&quot; (&quot;id&quot;, &quot;name&quot;, &quot;type&quot;, &quot;status&quot;, &quot;remark&quot;, &quot;creat
2500 2504 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);
2501 2505 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);
2502 2506 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);
  2507 +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);
2503 2508 COMMIT;
2504 2509  
2505 2510 -- ----------------------------
... ... @@ -2589,7 +2594,7 @@ COMMIT;
2589 2594 -- ----------------------------
2590 2595 DROP TABLE IF EXISTS "system_menu";
2591 2596 CREATE TABLE "system_menu" (
2592   - "id" int8 NOT NULL,
  2597 + "id" int8 NOT NULL DEFAULT nextval('system_menu_seq'::regclass),
2593 2598 "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
2594 2599 "permission" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
2595 2600 "type" int2 NOT NULL,
... ... @@ -2599,15 +2604,15 @@ CREATE TABLE &quot;system_menu&quot; (
2599 2604 "icon" varchar(100) COLLATE "pg_catalog"."default",
2600 2605 "component" varchar(255) COLLATE "pg_catalog"."default",
2601 2606 "status" int2 NOT NULL,
2602   - "visible" bool NOT NULL,
2603   - "keep_alive" bool NOT NULL,
  2607 + "visible" bool NOT NULL DEFAULT true,
  2608 + "keep_alive" bool NOT NULL DEFAULT false,
2604 2609 "creator" varchar(64) COLLATE "pg_catalog"."default",
2605   - "create_time" timestamp(6) NOT NULL,
  2610 + "create_time" timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
2606 2611 "updater" varchar(64) COLLATE "pg_catalog"."default",
2607   - "update_time" timestamp(6) NOT NULL,
  2612 + "update_time" timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
2608 2613 "deleted" int2 NOT NULL DEFAULT 0,
2609 2614 "component_name" varchar(255) COLLATE "pg_catalog"."default",
2610   - "always_show" char(1) COLLATE "pg_catalog"."default"
  2615 + "always_show" bool NOT NULL DEFAULT false
2611 2616 )
2612 2617 ;
2613 2618 COMMENT ON COLUMN "system_menu"."id" IS '菜单ID';
... ... @@ -2738,19 +2743,19 @@ INSERT INTO &quot;system_menu&quot; (&quot;id&quot;, &quot;name&quot;, &quot;permission&quot;, &quot;type&quot;, &quot;sort&quot;, &quot;parent_i
2738 2743 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');
2739 2744 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');
2740 2745 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');
2741   -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');
  2746 +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');
2742 2747 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');
2743 2748 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');
2744 2749 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');
2745 2750 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');
2746   -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');
  2751 +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');
2747 2752 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');
2748 2753 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');
2749 2754 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');
2750 2755 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');
2751 2756 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');
2752 2757 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');
2753   -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');
  2758 +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');
2754 2759 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');
2755 2760 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');
2756 2761 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');
... ... @@ -4239,7 +4244,7 @@ CREATE TABLE &quot;system_notify_message&quot; (
4239 4244 "template_content" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL,
4240 4245 "template_type" int4 NOT NULL,
4241 4246 "template_params" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
4242   - "read_status" varchar(1) COLLATE "pg_catalog"."default" NOT NULL,
  4247 + "read_status" bool NOT NULL DEFAULT false,
4243 4248 "read_time" timestamp(6),
4244 4249 "creator" varchar(64) COLLATE "pg_catalog"."default",
4245 4250 "create_time" timestamp(6) NOT NULL,
... ...
yudao-dependencies/pom.xml
... ... @@ -16,7 +16,7 @@
16 16 <properties>
17 17 <revision>1.7.3-snapshot</revision>
18 18 <!-- 统一依赖管理 -->
19   - <spring.boot.version>2.7.11</spring.boot.version>
  19 + <spring.boot.version>2.7.12</spring.boot.version>
20 20 <!-- Web 相关 -->
21 21 <springdoc.version>1.6.15</springdoc.version>
22 22 <knife4j.version>4.1.0</knife4j.version>
... ... @@ -52,10 +52,10 @@
52 52 <velocity.version>2.3</velocity.version>
53 53 <screw.version>1.0.5</screw.version>
54 54 <fastjson.version>1.2.83</fastjson.version>
55   - <guava.version>31.1-jre</guava.version>
  55 + <guava.version>32.0.0-jre</guava.version>
56 56 <guice.version>5.1.0</guice.version>
57 57 <transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
58   - <commons-net.version>3.8.0</commons-net.version>
  58 + <commons-net.version>3.9.0</commons-net.version>
59 59 <jsch.version>0.1.55</jsch.version>
60 60 <tika-core.version>2.7.0</tika-core.version>
61 61 <netty-all.version>4.1.90.Final</netty-all.version>
... ... @@ -67,7 +67,7 @@
67 67 <minio.version>8.5.2</minio.version>
68 68 <aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version>
69 69 <aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
70   - <tencentcloud-sdk-java.version>3.1.715</tencentcloud-sdk-java.version>
  70 + <tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version>
71 71 <justauth.version>1.4.0</justauth.version>
72 72 <jimureport.version>1.5.6</jimureport.version>
73 73 <xercesImpl.version>2.12.2</xercesImpl.version>
... ...
yudao-example/yudao-sso-demo-by-code/pom.xml
... ... @@ -21,7 +21,7 @@
21 21 <maven.compiler.target>8</maven.compiler.target>
22 22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 23 <!-- 统一依赖管理 -->
24   - <spring.boot.version>2.7.11</spring.boot.version>
  24 + <spring.boot.version>2.7.12</spring.boot.version>
25 25 </properties>
26 26  
27 27 <dependencyManagement>
... ...
yudao-example/yudao-sso-demo-by-password/pom.xml
... ... @@ -21,7 +21,7 @@
21 21 <maven.compiler.target>8</maven.compiler.target>
22 22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 23 <!-- 统一依赖管理 -->
24   - <spring.boot.version>2.7.11</spring.boot.version>
  24 + <spring.boot.version>2.7.12</spring.boot.version>
25 25 </properties>
26 26  
27 27 <dependencyManagement>
... ...
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;
36 36 * 注意,使用 DeptDataPermissionRule 时,需要保证表中有 dept_id 部门编号的字段,可自定义。
37 37 *
38 38 * 实际业务场景下,会存在一个经典的问题?当用户修改部门时,冗余的 dept_id 是否需要修改?
39   - * 1. 一般情况下,dept_id 不进行修改,则会导致用户看到之前的数据。【yudao-server 采用该方案】
  39 + * 1. 一般情况下,dept_id 不进行修改,则会导致用户看不到之前的数据。【yudao-server 采用该方案】
40 40 * 2. 部分情况下,希望该用户还是能看到之前的数据,则有两种方式解决:【需要你改造该 DeptDataPermissionRule 的实现代码】
41 41 * 1)编写洗数据的脚本,将 dept_id 修改成新部门的编号;【建议】
42 42 * 最终过滤条件是 WHERE dept_id = ?
... ...
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;
3 3 import cn.hutool.core.util.ClassUtil;
4 4 import cn.iocoder.yudao.framework.captcha.core.enums.CaptchaRedisKeyConstants;
5 5 import cn.iocoder.yudao.framework.captcha.core.service.RedisCaptchaServiceImpl;
  6 +import com.xingyuv.captcha.properties.AjCaptchaProperties;
6 7 import com.xingyuv.captcha.service.CaptchaCacheService;
  8 +import com.xingyuv.captcha.service.impl.CaptchaServiceFactory;
7 9 import org.springframework.boot.autoconfigure.AutoConfiguration;
8 10 import org.springframework.context.annotation.Bean;
9 11 import org.springframework.data.redis.core.StringRedisTemplate;
10 12  
  13 +import javax.annotation.Resource;
  14 +
11 15 @AutoConfiguration
12 16 public class YudaoCaptchaConfiguration {
13 17  
... ... @@ -17,9 +21,17 @@ public class YudaoCaptchaConfiguration {
17 21 ClassUtil.loadClass(CaptchaRedisKeyConstants.class.getName());
18 22 }
19 23  
  24 + @Resource
  25 + private StringRedisTemplate stringRedisTemplate;
  26 +
20 27 @Bean
21   - public CaptchaCacheService captchaCacheService(StringRedisTemplate stringRedisTemplate) {
22   - return new RedisCaptchaServiceImpl(stringRedisTemplate);
  28 + public CaptchaCacheService captchaCacheService(AjCaptchaProperties config) {
  29 + // 缓存类型 redis/local/....
  30 + CaptchaCacheService ret = CaptchaServiceFactory.getCache(config.getCacheType().name());
  31 + if (ret instanceof RedisCaptchaServiceImpl) {
  32 + ((RedisCaptchaServiceImpl) ret).setStringRedisTemplate(stringRedisTemplate);
  33 + }
  34 + return ret;
23 35 }
24 36  
25 37 }
... ...
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 {
25 25 return "redis";
26 26 }
27 27  
  28 + public void setStringRedisTemplate(StringRedisTemplate stringRedisTemplate) {
  29 + this.stringRedisTemplate = stringRedisTemplate;
  30 + }
  31 +
28 32 @Override
29 33 public void set(String key, String value, long expiresInSeconds) {
30 34 stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);
... ...
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;
7 7 import lombok.extern.slf4j.Slf4j;
8 8 import org.redisson.api.RLock;
9 9 import org.redisson.api.RedissonClient;
10   -import org.springframework.data.redis.connection.stream.Consumer;
11   -import org.springframework.data.redis.connection.stream.MapRecord;
12   -import org.springframework.data.redis.connection.stream.PendingMessagesSummary;
13   -import org.springframework.data.redis.connection.stream.ReadOffset;
14   -import org.springframework.data.redis.connection.stream.StreamOffset;
15   -import org.springframework.data.redis.connection.stream.StreamRecords;
  10 +import org.springframework.data.domain.Range;
  11 +import org.springframework.data.redis.connection.stream.*;
16 12 import org.springframework.data.redis.core.StreamOperations;
17 13 import org.springframework.scheduling.annotation.Scheduled;
18 14  
19 15 import java.util.List;
20 16 import java.util.Map;
  17 +import java.util.Objects;
21 18  
22 19 /**
23 20 * 这个任务用于处理,crash 之后的消费者未消费完的消息
... ... @@ -28,6 +25,14 @@ public class RedisPendingMessageResendJob {
28 25  
29 26 private static final String LOCK_KEY = "redis:pending:msg:lock";
30 27  
  28 + /**
  29 + * 消息超时时间,默认 5 分钟
  30 + *
  31 + * 1. 超时的消息才会被重新投递
  32 + * 2. 由于定时任务 1 分钟一次,消息超时后不会被立即重投,极端情况下消息5分钟过期后,再等 1 分钟才会被扫瞄到
  33 + */
  34 + private static final int EXPIRE_TIME = 5 * 60;
  35 +
31 36 private final List<AbstractStreamMessageListener<?>> listeners;
32 37 private final RedisMQTemplate redisTemplate;
33 38 private final String groupName;
... ... @@ -51,29 +56,44 @@ public class RedisPendingMessageResendJob {
51 56 }
52 57 }
53 58  
  59 + /**
  60 + * 执行清理逻辑
  61 + *
  62 + * @see <a href="https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/480/files">讨论</a>
  63 + */
54 64 private void execute() {
55 65 StreamOperations<String, Object, Object> ops = redisTemplate.getRedisTemplate().opsForStream();
56 66 listeners.forEach(listener -> {
57   - PendingMessagesSummary pendingMessagesSummary = ops.pending(listener.getStreamKey(), groupName);
  67 + PendingMessagesSummary pendingMessagesSummary = Objects.requireNonNull(ops.pending(listener.getStreamKey(), groupName));
58 68 // 每个消费者的 pending 队列消息数量
59 69 Map<String, Long> pendingMessagesPerConsumer = pendingMessagesSummary.getPendingMessagesPerConsumer();
60 70 pendingMessagesPerConsumer.forEach((consumerName, pendingMessageCount) -> {
61 71 log.info("[processPendingMessage][消费者({}) 消息数量({})]", consumerName, pendingMessageCount);
62   -
63   - // 从消费者的 pending 队列中读取消息
64   - List<MapRecord<String, Object, Object>> records = ops.read(Consumer.from(groupName, consumerName), StreamOffset.create(listener.getStreamKey(), ReadOffset.from("0")));
65   - if (CollUtil.isEmpty(records)) {
  72 + // 每个消费者的 pending消息的详情信息
  73 + PendingMessages pendingMessages = ops.pending(listener.getStreamKey(), Consumer.from(groupName, consumerName), Range.unbounded(), pendingMessageCount);
  74 + if (pendingMessages.isEmpty()) {
66 75 return;
67 76 }
68   - for (MapRecord<String, Object, Object> record : records) {
  77 + pendingMessages.forEach(pendingMessage -> {
  78 + // 获取消息上一次传递到 consumer 的时间,
  79 + long lastDelivery = pendingMessage.getElapsedTimeSinceLastDelivery().getSeconds();
  80 + if (lastDelivery < EXPIRE_TIME){
  81 + return;
  82 + }
  83 + // 获取指定 id 的消息体
  84 + List<MapRecord<String, Object, Object>> records = ops.range(listener.getStreamKey(),
  85 + Range.of(Range.Bound.inclusive(pendingMessage.getIdAsString()), Range.Bound.inclusive(pendingMessage.getIdAsString())));
  86 + if (CollUtil.isEmpty(records)) {
  87 + return;
  88 + }
69 89 // 重新投递消息
70 90 redisTemplate.getRedisTemplate().opsForStream().add(StreamRecords.newRecord()
71   - .ofObject(record.getValue()) // 设置内容
  91 + .ofObject(records.get(0).getValue()) // 设置内容
72 92 .withStreamKey(listener.getStreamKey()));
73   -
74 93 // ack 消息消费完成
75   - redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, record);
76   - }
  94 + redisTemplate.getRedisTemplate().opsForStream().acknowledge(groupName, records.get(0));
  95 + log.info("[processPendingMessage][消息({})重新投递成功]", records.get(0).getId());
  96 + });
77 97 });
78 98 });
79 99 }
... ...
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[] = [
122 122 #end
123 123 }
124 124 #elseif($column.htmlType == "radio")## 单选框
125   - component: 'Radio',
  125 + component: 'RadioButtonGroup',
126 126 componentProps: {
127 127 #if ("" != $dictType)## 有数据字典
128 128 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number')
... ... @@ -188,7 +188,7 @@ export const updateFormSchema: FormSchema[] = [
188 188 #end
189 189 }
190 190 #elseif($column.htmlType == "radio")## 单选框
191   - component: 'Radio',
  191 + component: 'RadioButtonGroup',
192 192 componentProps: {
193 193 #if ("" != $dictType)## 有数据字典
194 194 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number')
... ...
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 {
52 52 return success(true);
53 53 }
54 54  
  55 + @GetMapping("/get")
  56 + @Operation(summary = "获取公众号标签详情")
  57 + @PreAuthorize("@ss.hasPermission('mp:tag:query')")
  58 + public CommonResult<MpTagRespVO> get(@RequestParam("id") Long id) {
  59 + MpTagDO mpTagDO = mpTagService.get(id);
  60 + return success(MpTagConvert.INSTANCE.convert(mpTagDO));
  61 + }
  62 +
55 63 @GetMapping("/page")
56 64 @Operation(summary = "获取公众号标签分页")
57 65 @PreAuthorize("@ss.hasPermission('mp:tag:query')")
... ...
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 {
37 37 })
38 38 MpTagDO convert(WxUserTag tag, MpAccountDO account);
39 39  
  40 + MpTagRespVO convert(MpTagDO mpTagDO);
  41 +
40 42 List<MpTagSimpleRespVO> convertList02(List<MpTagDO> list);
41 43  
42 44 }
... ...
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 {
46 46 */
47 47 PageResult<MpTagDO> getTagPage(MpTagPageReqVO pageReqVO);
48 48  
  49 + /**
  50 + * 获得公众号标签详情
  51 + * @param id id查询
  52 + * @return 公众号标签详情
  53 + */
  54 + MpTagDO get(Long id);
  55 +
49 56 List<MpTagDO> getTagList();
50 57  
51 58 /**
... ...
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/tag/MpTagServiceImpl.java
... ... @@ -117,6 +117,11 @@ public class MpTagServiceImpl implements MpTagService {
117 117 }
118 118  
119 119 @Override
  120 + public MpTagDO get(Long id) {
  121 + return mpTagMapper.selectById(id);
  122 + }
  123 +
  124 + @Override
120 125 public List<MpTagDO> getTagList() {
121 126 return mpTagMapper.selectList();
122 127 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java
... ... @@ -18,6 +18,7 @@ import javax.validation.Valid;
18 18 import java.util.List;
19 19  
20 20 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
  21 +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
21 22  
22 23 @Tag(name = "管理后台 - 邮件模版")
23 24 @RestController
... ... @@ -81,7 +82,7 @@ public class MailTemplateController {
81 82 @Operation(summary = "发送短信")
82 83 @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
83 84 public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) {
84   - return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null,
  85 + return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), getLoginUserId(),
85 86 sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
86 87 }
87 88  
... ...
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 {
37 37 // 清理多余字段,避免缓存
38 38 accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
39 39 long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS);
40   - stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS);
  40 + if (time > 0) {
  41 + stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS);
  42 + }
41 43 }
42 44  
43 45 public void delete(String accessToken) {
... ...
yudao-server/pom.xml
... ... @@ -111,7 +111,7 @@
111 111 <plugin>
112 112 <groupId>org.springframework.boot</groupId>
113 113 <artifactId>spring-boot-maven-plugin</artifactId>
114   - <version>2.7.11</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
  114 + <version>2.7.12</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
115 115 <configuration>
116 116 <fork>true</fork>
117 117 </configuration>
... ...
yudao-ui-admin/.env.prod
1 1 # 生产环境配置
2   -ENV = 'production'
  2 +NODE_ENV = 'production'
3 3  
4 4 # 页面标题
5 5 VUE_APP_TITLE = 芋道管理系统
... ...