Commit 7731b4f5033c1ed1788e3d909ce5de3efef49afc
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/dev-yunai
Showing
188 changed files
with
9436 additions
and
345 deletions
Too many changes.
To preserve performance only 100 of 188 files are displayed.
README.md
| ... | ... | @@ -41,7 +41,20 @@ |
| 41 | 41 | | `ruoyi-vue-pro` | Spring Boot 多模块 | **[Gitee](https://gitee.com/zhijiantianya/ruoyi-vue-pro)** [Github](https://github.com/YunaiV/ruoyi-vue-pro) | |
| 42 | 42 | | `yudao-cloud` | Spring Cloud 微服务 | **[Gitee](https://gitee.com/zhijiantianya/yudao-cloud)** [Github](https://github.com/YunaiV/yudao-cloud) | |
| 43 | 43 | | `Spring-Boot-Labs` | Spring Boot & Cloud 入门 | **[Gitee](https://gitee.com/zhijiantianya/SpringBoot-Labs)** [Github](https://github.com/YunaiV/SpringBoot-Labs) | |
| 44 | - | `ruoyi-vue-pro-mini` | 精简版:移除工作流、支付等模块 | **[Gitee](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/mini)** | | |
| 44 | + | |
| 45 | +## 🐰 分支说明 | |
| 46 | + | |
| 47 | +| | JDK 8 完整版 | JDK 8 精简版 | JDK 17 完整版 | | |
| 48 | +|-------|-----------------------------------------------------------|--------------------------------------------------------------------|-----------------------------------------------------------------------------| | |
| 49 | +| 分支 | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`mini`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/mini/) | [`boot-dev`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/boot3-dev/) | | |
| 50 | +| 说明 | 包括所有功能 | 只保留核心功能 | 适配 Spring Boot 3.X | | |
| 51 | +| 系统功能 | √ | √ | √ | | |
| 52 | +| 基础设施 | √ | √ | √ | | |
| 53 | +| 会员中心 | √ | √ | √ | | |
| 54 | +| 工作流程 | √ | x | 适配中 | | |
| 55 | +| 数据报表 | √ | x | 适配中 | | |
| 56 | +| 商城系统 | √ | x | √ | | |
| 57 | +| 微信公众号 | √ | x | √ | | |
| 45 | 58 | |
| 46 | 59 | ## 😎 开源协议 |
| 47 | 60 | |
| ... | ... | @@ -55,6 +68,14 @@ |
| 55 | 68 | |
| 56 | 69 | ③ 代码整洁、架构整洁,遵循《阿里巴巴 Java 开发手册》规范,代码注释详细,57000 行 Java 代码,22000 行代码注释。 |
| 57 | 70 | |
| 71 | +## 🤝 项目外包 | |
| 72 | + | |
| 73 | +我们也是接外包滴,如果你有项目想要外包,可以微信联系【**Aix9975**】。 | |
| 74 | + | |
| 75 | +团队包含专业的项目经理、架构师、前端工程师、后端工程师、测试工程师、运维工程师,可以提供全流程的外包服务。 | |
| 76 | + | |
| 77 | +项目可以是商城、SCRM 系统、OA 系统、物流系统、ERP 系统、CMS 系统、HIS 系统、支付系统、IM 聊天、微信公众号、微信小程序等等。 | |
| 78 | + | |
| 58 | 79 | ## 🐼 内置功能 |
| 59 | 80 | |
| 60 | 81 | 系统内置多种多种业务功能,可以用于快速你的业务系统: |
| ... | ... | @@ -91,6 +112,8 @@ |
| 91 | 112 | | 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 | |
| 92 | 113 | | | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 | |
| 93 | 114 | | 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 | |
| 115 | +| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 | | |
| 116 | +| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 | | |
| 94 | 117 | | 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 | |
| 95 | 118 | | ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 | |
| 96 | 119 | | 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 | | ... | ... |
pom.xml
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 31 | 31 | |
| 32 | 32 | <properties> |
| 33 | - <revision>1.6.6-snapshot</revision> | |
| 33 | + <revision>1.7.0-snapshot</revision> | |
| 34 | 34 | <!-- Maven 相关 --> |
| 35 | 35 | <java.version>1.8</java.version> |
| 36 | 36 | <maven.compiler.source>${java.version}</maven.compiler.source> |
| ... | ... | @@ -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.24</lombok.version> |
| 42 | - <spring.boot.version>2.7.7</spring.boot.version> | |
| 42 | + <spring.boot.version>2.7.8</spring.boot.version> | |
| 43 | 43 | <mapstruct.version>1.5.3.Final</mapstruct.version> |
| 44 | 44 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 45 | 45 | </properties> | ... | ... |
sql/mysql/ruoyi-vue-pro.sql
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | Target Server Version : 80026 |
| 12 | 12 | File Encoding : 65001 |
| 13 | 13 | |
| 14 | - Date: 17/01/2023 23:47:35 | |
| 14 | + Date: 27/01/2023 20:57:31 | |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | SET NAMES utf8mb4; |
| ... | ... | @@ -300,7 +300,7 @@ CREATE TABLE `bpm_form` ( |
| 300 | 300 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 301 | 301 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 302 | 302 | PRIMARY KEY (`id`) USING BTREE |
| 303 | -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的表单定义'; | |
| 303 | +) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的表单定义'; | |
| 304 | 304 | |
| 305 | 305 | -- ---------------------------- |
| 306 | 306 | -- Records of bpm_form |
| ... | ... | @@ -329,7 +329,7 @@ CREATE TABLE `bpm_oa_leave` ( |
| 329 | 329 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 330 | 330 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 331 | 331 | PRIMARY KEY (`id`) USING BTREE |
| 332 | -) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OA 请假申请表'; | |
| 332 | +) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OA 请假申请表'; | |
| 333 | 333 | |
| 334 | 334 | -- ---------------------------- |
| 335 | 335 | -- Records of bpm_oa_leave |
| ... | ... | @@ -359,7 +359,7 @@ CREATE TABLE `bpm_process_definition_ext` ( |
| 359 | 359 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 360 | 360 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 361 | 361 | PRIMARY KEY (`id`) USING BTREE |
| 362 | -) ENGINE = InnoDB AUTO_INCREMENT = 135 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Bpm 流程定义的拓展表\n'; | |
| 362 | +) ENGINE = InnoDB AUTO_INCREMENT = 140 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Bpm 流程定义的拓展表\n'; | |
| 363 | 363 | |
| 364 | 364 | -- ---------------------------- |
| 365 | 365 | -- Records of bpm_process_definition_ext |
| ... | ... | @@ -389,7 +389,7 @@ CREATE TABLE `bpm_process_instance_ext` ( |
| 389 | 389 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 390 | 390 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 391 | 391 | PRIMARY KEY (`id`) USING BTREE |
| 392 | -) ENGINE = InnoDB AUTO_INCREMENT = 290 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的流程实例的拓展'; | |
| 392 | +) ENGINE = InnoDB AUTO_INCREMENT = 295 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的流程实例的拓展'; | |
| 393 | 393 | |
| 394 | 394 | -- ---------------------------- |
| 395 | 395 | -- Records of bpm_process_instance_ext |
| ... | ... | @@ -415,7 +415,7 @@ CREATE TABLE `bpm_task_assign_rule` ( |
| 415 | 415 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 416 | 416 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 417 | 417 | PRIMARY KEY (`id`) USING BTREE |
| 418 | -) ENGINE = InnoDB AUTO_INCREMENT = 265 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Bpm 任务规则表'; | |
| 418 | +) ENGINE = InnoDB AUTO_INCREMENT = 274 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Bpm 任务规则表'; | |
| 419 | 419 | |
| 420 | 420 | -- ---------------------------- |
| 421 | 421 | -- Records of bpm_task_assign_rule |
| ... | ... | @@ -444,7 +444,7 @@ CREATE TABLE `bpm_task_ext` ( |
| 444 | 444 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 445 | 445 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 446 | 446 | PRIMARY KEY (`id`) USING BTREE |
| 447 | -) ENGINE = InnoDB AUTO_INCREMENT = 341 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的流程任务的拓展表'; | |
| 447 | +) ENGINE = InnoDB AUTO_INCREMENT = 350 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '工作流的流程任务的拓展表'; | |
| 448 | 448 | |
| 449 | 449 | -- ---------------------------- |
| 450 | 450 | -- Records of bpm_task_ext |
| ... | ... | @@ -469,7 +469,7 @@ CREATE TABLE `bpm_user_group` ( |
| 469 | 469 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 470 | 470 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 471 | 471 | PRIMARY KEY (`id`) USING BTREE |
| 472 | -) ENGINE = InnoDB AUTO_INCREMENT = 111 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户组'; | |
| 472 | +) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户组'; | |
| 473 | 473 | |
| 474 | 474 | -- ---------------------------- |
| 475 | 475 | -- Records of bpm_user_group |
| ... | ... | @@ -546,7 +546,7 @@ CREATE TABLE `infra_api_error_log` ( |
| 546 | 546 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 547 | 547 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 548 | 548 | PRIMARY KEY (`id`) USING BTREE |
| 549 | -) ENGINE = InnoDB AUTO_INCREMENT = 931 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 549 | +) ENGINE = InnoDB AUTO_INCREMENT = 965 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 550 | 550 | |
| 551 | 551 | -- ---------------------------- |
| 552 | 552 | -- Records of infra_api_error_log |
| ... | ... | @@ -584,7 +584,7 @@ CREATE TABLE `infra_codegen_column` ( |
| 584 | 584 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 585 | 585 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 586 | 586 | PRIMARY KEY (`id`) USING BTREE |
| 587 | -) ENGINE = InnoDB AUTO_INCREMENT = 1533 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; | |
| 587 | +) ENGINE = InnoDB AUTO_INCREMENT = 1612 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; | |
| 588 | 588 | |
| 589 | 589 | -- ---------------------------- |
| 590 | 590 | -- Records of infra_codegen_column |
| ... | ... | @@ -616,7 +616,7 @@ CREATE TABLE `infra_codegen_table` ( |
| 616 | 616 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 617 | 617 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 618 | 618 | PRIMARY KEY (`id`) USING BTREE |
| 619 | -) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; | |
| 619 | +) ENGINE = InnoDB AUTO_INCREMENT = 124 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; | |
| 620 | 620 | |
| 621 | 621 | -- ---------------------------- |
| 622 | 622 | -- Records of infra_codegen_table |
| ... | ... | @@ -699,7 +699,7 @@ CREATE TABLE `infra_file` ( |
| 699 | 699 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 700 | 700 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 701 | 701 | PRIMARY KEY (`id`) USING BTREE |
| 702 | -) ENGINE = InnoDB AUTO_INCREMENT = 355 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 702 | +) ENGINE = InnoDB AUTO_INCREMENT = 356 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 703 | 703 | |
| 704 | 704 | -- ---------------------------- |
| 705 | 705 | -- Records of infra_file |
| ... | ... | @@ -1191,7 +1191,7 @@ CREATE TABLE `system_dict_data` ( |
| 1191 | 1191 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1192 | 1192 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1193 | 1193 | PRIMARY KEY (`id`) USING BTREE |
| 1194 | -) ENGINE = InnoDB AUTO_INCREMENT = 1213 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 1194 | +) ENGINE = InnoDB AUTO_INCREMENT = 1229 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 1195 | 1195 | |
| 1196 | 1196 | -- ---------------------------- |
| 1197 | 1197 | -- Records of system_dict_data |
| ... | ... | @@ -1391,6 +1391,12 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 1391 | 1391 | 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 (1220, 8, '地理位置', 'location', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 地理位置', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:23:51', b'0'); |
| 1392 | 1392 | 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 (1221, 9, '链接', 'link', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 链接', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', b'0'); |
| 1393 | 1393 | 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 (1222, 10, '事件', 'event', 'mp_message_type', 0, 'default', '', '公众号的消息类型 - 事件', '1', '2023-01-17 22:17:32', '1', '2023-01-17 14:24:49', b'0'); |
| 1394 | +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 (1223, 0, '初始化', '0', 'system_mail_send_status', 0, 'primary', '', '邮件发送状态 - 初始化\n', '1', '2023-01-26 09:53:49', '1', '2023-01-26 16:36:14', b'0'); | |
| 1395 | +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 (1224, 10, '发送成功', '10', 'system_mail_send_status', 0, 'success', '', '邮件发送状态 - 发送成功', '1', '2023-01-26 09:54:28', '1', '2023-01-26 16:36:22', b'0'); | |
| 1396 | +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 (1225, 20, '发送失败', '20', 'system_mail_send_status', 0, 'danger', '', '邮件发送状态 - 发送失败', '1', '2023-01-26 09:54:50', '1', '2023-01-26 16:36:26', b'0'); | |
| 1397 | +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 (1226, 30, '不发送', '30', 'system_mail_send_status', 0, 'info', '', '邮件发送状态 - 不发送', '1', '2023-01-26 09:55:06', '1', '2023-01-26 16:36:36', b'0'); | |
| 1398 | +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 (1227, 1, '通知公告', '1', 'system_notify_template_type', 0, 'primary', '', '站内信模版的类型 - 通知公告', '1', '2023-01-28 10:35:59', '1', '2023-01-28 10:35:59', b'0'); | |
| 1399 | +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 (1228, 2, '系统消息', '2', 'system_notify_template_type', 0, 'success', '', '站内信模版的类型 - 系统消息', '1', '2023-01-28 10:36:20', '1', '2023-01-28 10:36:25', b'0'); | |
| 1394 | 1400 | COMMIT; |
| 1395 | 1401 | |
| 1396 | 1402 | -- ---------------------------- |
| ... | ... | @@ -1411,7 +1417,7 @@ CREATE TABLE `system_dict_type` ( |
| 1411 | 1417 | `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', |
| 1412 | 1418 | PRIMARY KEY (`id`) USING BTREE, |
| 1413 | 1419 | UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE |
| 1414 | -) ENGINE = InnoDB AUTO_INCREMENT = 165 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; | |
| 1420 | +) ENGINE = InnoDB AUTO_INCREMENT = 168 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; | |
| 1415 | 1421 | |
| 1416 | 1422 | -- ---------------------------- |
| 1417 | 1423 | -- Records of system_dict_type |
| ... | ... | @@ -1474,6 +1480,8 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat |
| 1474 | 1480 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (163, '交易订单项的售后状态', 'trade_order_item_after_sale_status', 0, '交易订单项的售后状态', '1', '2022-12-10 20:58:08', '1', '2022-12-10 20:58:08', b'0', NULL); |
| 1475 | 1481 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (164, '公众号自动回复的请求关键字匹配模式', 'mp_auto_reply_request_match', 0, '公众号自动回复的请求关键字匹配模式', '1', '2023-01-16 23:29:56', '1', '2023-01-16 23:29:56', b'0', '1970-01-01 00:00:00'); |
| 1476 | 1482 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (165, '公众号的消息类型', 'mp_message_type', 0, '公众号的消息类型', '1', '2023-01-17 22:17:09', '1', '2023-01-17 22:17:09', b'0', '1970-01-01 00:00:00'); |
| 1483 | +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (166, '邮件发送状态', 'system_mail_send_status', 0, '邮件发送状态', '1', '2023-01-26 09:53:13', '1', '2023-01-26 09:53:13', b'0', '1970-01-01 00:00:00'); | |
| 1484 | +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (167, '站内信模版的类型', 'system_notify_template_type', 0, '站内信模版的类型', '1', '2023-01-28 10:35:10', '1', '2023-01-28 10:35:10', b'0', '1970-01-01 00:00:00'); | |
| 1477 | 1485 | COMMIT; |
| 1478 | 1486 | |
| 1479 | 1487 | -- ---------------------------- |
| ... | ... | @@ -1522,7 +1530,7 @@ CREATE TABLE `system_login_log` ( |
| 1522 | 1530 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1523 | 1531 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 1524 | 1532 | PRIMARY KEY (`id`) USING BTREE |
| 1525 | -) ENGINE = InnoDB AUTO_INCREMENT = 1963 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1533 | +) ENGINE = InnoDB AUTO_INCREMENT = 1985 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1526 | 1534 | |
| 1527 | 1535 | -- ---------------------------- |
| 1528 | 1536 | -- Records of system_login_log |
| ... | ... | @@ -1531,6 +1539,102 @@ BEGIN; |
| 1531 | 1539 | COMMIT; |
| 1532 | 1540 | |
| 1533 | 1541 | -- ---------------------------- |
| 1542 | +-- Table structure for system_mail_account | |
| 1543 | +-- ---------------------------- | |
| 1544 | +DROP TABLE IF EXISTS `system_mail_account`; | |
| 1545 | +CREATE TABLE `system_mail_account` ( | |
| 1546 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 1547 | + `mail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮箱', | |
| 1548 | + `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名', | |
| 1549 | + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码', | |
| 1550 | + `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'SMTP 服务器域名', | |
| 1551 | + `port` int NOT NULL COMMENT 'SMTP 服务器端口', | |
| 1552 | + `ssl_enable` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否开启 SSL', | |
| 1553 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 1554 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 1555 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 1556 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 1557 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 1558 | + PRIMARY KEY (`id`) USING BTREE | |
| 1559 | +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮箱账号表'; | |
| 1560 | + | |
| 1561 | +-- ---------------------------- | |
| 1562 | +-- Records of system_mail_account | |
| 1563 | +-- ---------------------------- | |
| 1564 | +BEGIN; | |
| 1565 | +INSERT INTO `system_mail_account` (`id`, `mail`, `username`, `password`, `host`, `port`, `ssl_enable`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '7684413@qq.com', '7684413@qq.com', '123457', '127.0.0.1', 8080, b'0', '1', '2023-01-25 17:39:52', '1', '2023-01-26 22:59:04', b'0'); | |
| 1566 | +INSERT INTO `system_mail_account` (`id`, `mail`, `username`, `password`, `host`, `port`, `ssl_enable`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, b'1', '1', '2023-01-26 01:26:03', '1', '2023-01-26 01:26:03', b'0'); | |
| 1567 | +INSERT INTO `system_mail_account` (`id`, `mail`, `username`, `password`, `host`, `port`, `ssl_enable`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, b'0', '1', '2023-01-27 15:06:38', '1', '2023-01-27 07:08:36', b'1'); | |
| 1568 | +COMMIT; | |
| 1569 | + | |
| 1570 | +-- ---------------------------- | |
| 1571 | +-- Table structure for system_mail_log | |
| 1572 | +-- ---------------------------- | |
| 1573 | +DROP TABLE IF EXISTS `system_mail_log`; | |
| 1574 | +CREATE TABLE `system_mail_log` ( | |
| 1575 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', | |
| 1576 | + `user_id` bigint NULL DEFAULT NULL COMMENT '用户编号', | |
| 1577 | + `user_type` tinyint NULL DEFAULT NULL COMMENT '用户类型', | |
| 1578 | + `to_mail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '接收邮箱地址', | |
| 1579 | + `account_id` bigint NOT NULL COMMENT '邮箱账号编号', | |
| 1580 | + `from_mail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '发送邮箱地址', | |
| 1581 | + `template_id` bigint NOT NULL COMMENT '模板编号', | |
| 1582 | + `template_code` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板编码', | |
| 1583 | + `template_nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '模版发送人名称', | |
| 1584 | + `template_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮件标题', | |
| 1585 | + `template_content` varchar(10240) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮件内容', | |
| 1586 | + `template_params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮件参数', | |
| 1587 | + `send_status` tinyint NOT NULL DEFAULT 0 COMMENT '发送状态', | |
| 1588 | + `send_time` datetime NULL DEFAULT NULL COMMENT '发送时间', | |
| 1589 | + `send_message_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发送返回的消息 ID', | |
| 1590 | + `send_exception` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发送异常', | |
| 1591 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 1592 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 1593 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 1594 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 1595 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 1596 | + PRIMARY KEY (`id`) USING BTREE | |
| 1597 | +) ENGINE = InnoDB AUTO_INCREMENT = 354 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件日志表'; | |
| 1598 | + | |
| 1599 | +-- ---------------------------- | |
| 1600 | +-- Records of system_mail_log | |
| 1601 | +-- ---------------------------- | |
| 1602 | +BEGIN; | |
| 1603 | +COMMIT; | |
| 1604 | + | |
| 1605 | +-- ---------------------------- | |
| 1606 | +-- Table structure for system_mail_template | |
| 1607 | +-- ---------------------------- | |
| 1608 | +DROP TABLE IF EXISTS `system_mail_template`; | |
| 1609 | +CREATE TABLE `system_mail_template` ( | |
| 1610 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', | |
| 1611 | + `name` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板名称', | |
| 1612 | + `code` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板编码', | |
| 1613 | + `account_id` bigint NOT NULL COMMENT '发送的邮箱账号编号', | |
| 1614 | + `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发送人名称', | |
| 1615 | + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板标题', | |
| 1616 | + `content` varchar(10240) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板内容', | |
| 1617 | + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数数组', | |
| 1618 | + `status` tinyint NOT NULL COMMENT '开启状态', | |
| 1619 | + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', | |
| 1620 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 1621 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 1622 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 1623 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 1624 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 1625 | + PRIMARY KEY (`id`) USING BTREE | |
| 1626 | +) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件模版表'; | |
| 1627 | + | |
| 1628 | +-- ---------------------------- | |
| 1629 | +-- Records of system_mail_template | |
| 1630 | +-- ---------------------------- | |
| 1631 | +BEGIN; | |
| 1632 | +INSERT INTO `system_mail_template` (`id`, `name`, `code`, `account_id`, `nickname`, `title`, `content`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '<p>您的验证码是{code},名字是{name}</p>', '[\"code\",\"name\"]', 0, '3', '1', '2021-10-11 08:10:00', '1', '2023-01-26 23:22:05', b'0'); | |
| 1633 | +INSERT INTO `system_mail_template` (`id`, `name`, `code`, `account_id`, `nickname`, `title`, `content`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '<p>你是 {key01} 吗?</p><p><br></p><p>是的话,赶紧 {key02} 一下!</p>', '[\"key01\",\"key02\"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2023-01-27 10:32:16', b'0'); | |
| 1634 | +INSERT INTO `system_mail_template` (`id`, `name`, `code`, `account_id`, `nickname`, `title`, `content`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (15, '3', '2', 2, '7', '4', '<p>45</p>', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2023-01-27 16:34:49', b'0'); | |
| 1635 | +COMMIT; | |
| 1636 | + | |
| 1637 | +-- ---------------------------- | |
| 1534 | 1638 | -- Table structure for system_menu |
| 1535 | 1639 | -- ---------------------------- |
| 1536 | 1640 | DROP TABLE IF EXISTS `system_menu`; |
| ... | ... | @@ -1553,7 +1657,7 @@ CREATE TABLE `system_menu` ( |
| 1553 | 1657 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1554 | 1658 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1555 | 1659 | PRIMARY KEY (`id`) USING BTREE |
| 1556 | -) ENGINE = InnoDB AUTO_INCREMENT = 2125 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1660 | +) ENGINE = InnoDB AUTO_INCREMENT = 2153 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1557 | 1661 | |
| 1558 | 1662 | -- ---------------------------- |
| 1559 | 1663 | -- Records of system_menu |
| ... | ... | @@ -1776,7 +1880,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 1776 | 1880 | 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`) VALUES (1250, '敏感词更新', 'system:sensitive-word:update', 3, 3, 1247, '', '', '', 0, b'1', b'1', '', '2022-04-07 16:55:03', '', '2022-04-20 17:03:10', b'0'); |
| 1777 | 1881 | 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`) VALUES (1251, '敏感词删除', 'system:sensitive-word:delete', 3, 4, 1247, '', '', '', 0, b'1', b'1', '', '2022-04-07 16:55:03', '', '2022-04-20 17:03:10', b'0'); |
| 1778 | 1882 | 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`) VALUES (1252, '敏感词导出', 'system:sensitive-word:export', 3, 5, 1247, '', '', '', 0, b'1', b'1', '', '2022-04-07 16:55:03', '', '2022-04-20 17:03:10', b'0'); |
| 1779 | -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`) VALUES (1254, '作者动态', '', 1, 0, 0, 'https://www.iocoder.cn', 'people', NULL, 0, b'1', b'1', '1', '2022-04-23 01:03:15', '1', '2022-06-22 13:35:05', b'0'); | |
| 1883 | +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`) VALUES (1254, '作者动态', '', 1, 0, 0, 'https://www.iocoder.cn', 'people', NULL, 0, b'1', b'1', '1', '2022-04-23 01:03:15', '1', '2023-01-28 12:33:52', b'0'); | |
| 1780 | 1884 | 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`) VALUES (1255, '数据源配置', '', 2, 1, 2, 'data-source-config', 'rate', 'infra/dataSourceConfig/index', 0, b'1', b'1', '', '2022-04-27 14:37:32', '1', '2022-04-27 22:42:06', b'0'); |
| 1781 | 1885 | 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`) VALUES (1256, '数据源配置查询', 'infra:data-source-config:query', 3, 1, 1255, '', '', '', 0, b'1', b'1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', b'0'); |
| 1782 | 1886 | 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`) VALUES (1257, '数据源配置创建', 'infra:data-source-config:create', 3, 2, 1255, '', '', '', 0, b'1', b'1', '', '2022-04-27 14:37:32', '', '2022-04-27 14:37:32', b'0'); |
| ... | ... | @@ -1791,76 +1895,76 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 1791 | 1895 | 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`) VALUES (1267, '客户端删除', 'system:oauth2-client:delete', 3, 4, 1263, '', '', '', 0, b'1', b'1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:33', b'0'); |
| 1792 | 1896 | 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`) VALUES (1281, '报表管理', '', 1, 40, 0, '/visualization', 'chart', NULL, 0, b'1', b'1', '1', '2022-07-10 20:22:15', '1', '2022-12-10 16:33:13', b'0'); |
| 1793 | 1897 | 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`) VALUES (1282, '报表设计器', '', 2, 1, 1281, 'jimu-report', 'example', 'visualization/jmreport/index', 0, b'1', b'1', '1', '2022-07-10 20:26:36', '1', '2022-07-29 12:48:05', b'0'); |
| 1794 | -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`) VALUES (2000, '商品中心', '', 1, 60, 0, '/product', 'merchant', NULL, 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:26:19', b'0'); | |
| 1795 | -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`) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'dict', 'mall/product/category/index', 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:23:37', b'0'); | |
| 1796 | -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`) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1797 | -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`) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1798 | -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`) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1799 | -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`) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1800 | -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`) VALUES (2008, '商品品牌', '', 2, 3, 2000, 'brand', 'dashboard', 'mall/product/brand/index', 0, b'1', b'1', '', '2022-07-30 13:52:44', '1', '2022-10-24 22:29:30', b'0'); | |
| 1801 | -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`) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1802 | -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`) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1803 | -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`) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1804 | -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`) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1805 | -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`) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'list', 'mall/product/spu/index', 0, b'1', b'1', '', '2022-07-30 14:22:58', '1', '2022-10-24 22:29:25', b'0'); | |
| 1806 | -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`) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1807 | -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`) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1808 | -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`) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1809 | -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`) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1810 | -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`) VALUES (2019, '商品属性', '', 2, 3, 2000, 'property', 'eye', 'mall/product/property/index', 0, b'1', b'1', '', '2022-08-01 14:55:35', '1', '2022-12-12 20:58:06', b'0'); | |
| 1811 | -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`) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:24', b'0'); | |
| 1812 | -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`) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:30', b'0'); | |
| 1813 | -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`) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:33', b'0'); | |
| 1814 | -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`) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:37', b'0'); | |
| 1815 | -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`) VALUES (2025, 'Banner管理', '', 2, 100, 2000, 'banner', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '1', '2022-10-24 22:29:39', b'0'); | |
| 1816 | -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`) VALUES (2026, 'Banner查询', 'market:banner:query', 3, 1, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1817 | -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`) VALUES (2027, 'Banner创建', 'market:banner:create', 3, 2, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1818 | -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`) VALUES (2028, 'Banner更新', 'market:banner:update', 3, 3, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1819 | -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`) VALUES (2029, 'Banner删除', 'market:banner:delete', 3, 4, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1820 | -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`) VALUES (2030, '营销中心', '', 1, 70, 0, '/promotion', 'rate', NULL, 0, b'1', b'1', '1', '2022-10-31 21:25:09', '1', '2022-10-31 21:25:09', b'0'); | |
| 1821 | -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`) VALUES (2032, '优惠劵', '', 2, 2, 2030, 'coupon-template', 'textarea', 'mall/promotion/couponTemplate/index', 0, b'1', b'1', '', '2022-10-31 22:27:14', '1', '2022-11-05 12:27:34', b'0'); | |
| 1822 | -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`) VALUES (2033, '优惠劵模板查询', 'promotion:coupon-template:query', 3, 1, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1823 | -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`) VALUES (2034, '优惠劵模板创建', 'promotion:coupon-template:create', 3, 2, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1824 | -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`) VALUES (2035, '优惠劵模板更新', 'promotion:coupon-template:update', 3, 3, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1825 | -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`) VALUES (2036, '优惠劵模板删除', 'promotion:coupon-template:delete', 3, 4, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1826 | -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`) VALUES (2038, '会员优惠劵', '', 2, 2, 2030, 'coupon', '', 'mall/promotion/coupon/index', 0, b'0', b'1', '', '2022-11-03 23:21:31', '1', '2022-11-05 12:27:45', b'0'); | |
| 1827 | -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`) VALUES (2039, '优惠劵查询', 'promotion:coupon:query', 3, 1, 2038, '', '', '', 0, b'1', b'1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', b'0'); | |
| 1828 | -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`) VALUES (2040, '优惠劵删除', 'promotion:coupon:delete', 3, 4, 2038, '', '', '', 0, b'1', b'1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', b'0'); | |
| 1829 | -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`) VALUES (2041, '满减送活动', '', 2, 10, 2030, 'reward-activity', 'radio', 'mall/promotion/rewardActivity/index', 0, b'1', b'1', '', '2022-11-04 23:47:49', '1', '2022-11-05 12:27:56', b'0'); | |
| 1830 | -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`) VALUES (2042, '满减送活动查询', 'promotion:reward-activity:query', 3, 1, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', b'0'); | |
| 1831 | -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`) VALUES (2043, '满减送活动创建', 'promotion:reward-activity:create', 3, 2, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', b'0'); | |
| 1832 | -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`) VALUES (2044, '满减送活动更新', 'promotion:reward-activity:update', 3, 3, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', b'0'); | |
| 1833 | -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`) VALUES (2045, '满减送活动删除', 'promotion:reward-activity:delete', 3, 4, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', b'0'); | |
| 1834 | -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`) VALUES (2046, '满减送活动关闭', 'promotion:reward-activity:close', 3, 5, 2041, '', '', '', 0, b'1', b'1', '1', '2022-11-05 10:42:53', '1', '2022-11-05 10:42:53', b'0'); | |
| 1835 | -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`) VALUES (2047, '限时折扣活动', '', 2, 7, 2030, 'discount-activity', 'time', 'mall/promotion/discountActivity/index', 0, b'1', b'1', '', '2022-11-05 17:12:15', '1', '2022-11-29 22:14:56', b'0'); | |
| 1836 | -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`) VALUES (2048, '限时折扣活动查询', 'promotion:discount-activity:query', 3, 1, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', b'0'); | |
| 1837 | -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`) VALUES (2049, '限时折扣活动创建', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', b'0'); | |
| 1838 | -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`) VALUES (2050, '限时折扣活动更新', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1839 | -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`) VALUES (2051, '限时折扣活动删除', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1840 | -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`) VALUES (2052, '限时折扣活动关闭', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1841 | -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`) VALUES (2059, '秒杀活动管理', '', 2, 0, 2030, 'seckill-activity', 'time-range', 'mall/promotion/seckill/seckillActivity/index', 0, b'1', b'1', '', '2022-11-06 22:24:49', '1', '2022-11-29 22:24:39', b'0'); | |
| 1842 | -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`) VALUES (2060, '秒杀活动查询', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1843 | -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`) VALUES (2061, '秒杀活动创建', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1844 | -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`) VALUES (2062, '秒杀活动更新', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1845 | -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`) VALUES (2063, '秒杀活动删除', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1846 | -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`) VALUES (2064, '秒杀活动导出', 'promotion:seckill-activity:export', 3, 5, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1847 | -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`) VALUES (2066, '秒杀时段管理', '', 2, 0, 2030, 'seckill-time', '', 'mall/promotion/seckill/seckillTime/index', 0, b'0', b'1', '', '2022-11-15 19:46:50', '1', '2022-11-29 22:09:03', b'0'); | |
| 1848 | -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`) VALUES (2067, '秒杀时段查询', 'promotion:seckill-time:query', 3, 1, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1849 | -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`) VALUES (2068, '秒杀时段创建', 'promotion:seckill-time:create', 3, 2, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1850 | -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`) VALUES (2069, '秒杀时段更新', 'promotion:seckill-time:update', 3, 3, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1851 | -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`) VALUES (2070, '秒杀时段删除', 'promotion:seckill-time:delete', 3, 4, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1852 | -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`) VALUES (2071, '秒杀时段导出', 'promotion:seckill-time:export', 3, 5, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1853 | -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`) VALUES (2072, '订单中心', '', 1, 65, 0, '/trade', 'order', NULL, 0, b'1', b'1', '1', '2022-11-19 18:57:19', '1', '2022-12-10 16:32:57', b'0'); | |
| 1854 | -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`) VALUES (2073, '售后退款', '', 2, 1, 2072, 'trade/after-sale', 'education', 'mall/trade/afterSale/index', 0, b'1', b'1', '', '2022-11-19 20:15:32', '1', '2022-12-10 21:11:02', b'0'); | |
| 1855 | -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`) VALUES (2074, '售后查询', 'trade:after-sale:query', 3, 1, 2073, '', '', '', 0, b'1', b'1', '', '2022-11-19 20:15:33', '1', '2022-12-10 21:04:29', b'0'); | |
| 1856 | -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`) VALUES (2075, '秒杀活动关闭', 'promotion:sekill-activity:close', 3, 6, 2059, '', '', '', 0, b'1', b'1', '1', '2022-11-28 20:20:15', '1', '2022-11-28 20:20:15', b'0'); | |
| 1857 | -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`) VALUES (2076, '订单列表', '', 2, 0, 2072, 'trade/order', 'list', 'mall/trade/order/index', 0, b'1', b'1', '1', '2022-12-10 21:05:44', '1', '2022-12-10 21:08:44', b'0'); | |
| 1858 | -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`) VALUES (2077, '物流公司管理管理', '', 2, 0, 2072, 'express-company', '', 'mall/trade/expressCompany/index', 0, b'1', b'1', '', '2022-12-20 23:27:55', '1', '2022-12-20 23:36:20', b'0'); | |
| 1859 | -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`) VALUES (2078, '物流公司管理查询', 'trade:express-company:query', 3, 1, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1860 | -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`) VALUES (2079, '物流公司管理创建', 'trade:express-company:create', 3, 2, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1861 | -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`) VALUES (2080, '物流公司管理更新', 'trade:express-company:update', 3, 3, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1862 | -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`) VALUES (2081, '物流公司管理删除', 'trade:express-company:delete', 3, 4, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1863 | -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`) VALUES (2082, '物流公司管理导出', 'trade:express-company:export', 3, 5, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1898 | +# 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`) VALUES (2000, '商品中心', '', 1, 60, 0, '/product', 'merchant', NULL, 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:26:19', b'0'); | |
| 1899 | +# 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`) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'dict', 'mall/product/category/index', 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:23:37', b'0'); | |
| 1900 | +# 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`) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1901 | +# 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`) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1902 | +# 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`) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1903 | +# 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`) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 1904 | +# 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`) VALUES (2008, '商品品牌', '', 2, 3, 2000, 'brand', 'dashboard', 'mall/product/brand/index', 0, b'1', b'1', '', '2022-07-30 13:52:44', '1', '2022-10-24 22:29:30', b'0'); | |
| 1905 | +# 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`) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1906 | +# 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`) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1907 | +# 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`) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1908 | +# 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`) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 1909 | +# 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`) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'list', 'mall/product/spu/index', 0, b'1', b'1', '', '2022-07-30 14:22:58', '1', '2022-10-24 22:29:25', b'0'); | |
| 1910 | +# 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`) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1911 | +# 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`) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1912 | +# 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`) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1913 | +# 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`) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 1914 | +# 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`) VALUES (2019, '商品属性', '', 2, 3, 2000, 'property', 'eye', 'mall/product/property/index', 0, b'1', b'1', '', '2022-08-01 14:55:35', '1', '2022-12-12 20:58:06', b'0'); | |
| 1915 | +# 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`) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:24', b'0'); | |
| 1916 | +# 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`) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:30', b'0'); | |
| 1917 | +# 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`) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:33', b'0'); | |
| 1918 | +# 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`) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-12-12 20:26:37', b'0'); | |
| 1919 | +# 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`) VALUES (2025, 'Banner管理', '', 2, 100, 2000, 'banner', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '1', '2022-10-24 22:29:39', b'0'); | |
| 1920 | +# 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`) VALUES (2026, 'Banner查询', 'market:banner:query', 3, 1, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1921 | +# 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`) VALUES (2027, 'Banner创建', 'market:banner:create', 3, 2, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1922 | +# 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`) VALUES (2028, 'Banner更新', 'market:banner:update', 3, 3, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1923 | +# 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`) VALUES (2029, 'Banner删除', 'market:banner:delete', 3, 4, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 1924 | +# 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`) VALUES (2030, '营销中心', '', 1, 70, 0, '/promotion', 'rate', NULL, 0, b'1', b'1', '1', '2022-10-31 21:25:09', '1', '2022-10-31 21:25:09', b'0'); | |
| 1925 | +# 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`) VALUES (2032, '优惠劵', '', 2, 2, 2030, 'coupon-template', 'textarea', 'mall/promotion/couponTemplate/index', 0, b'1', b'1', '', '2022-10-31 22:27:14', '1', '2022-11-05 12:27:34', b'0'); | |
| 1926 | +# 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`) VALUES (2033, '优惠劵模板查询', 'promotion:coupon-template:query', 3, 1, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1927 | +# 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`) VALUES (2034, '优惠劵模板创建', 'promotion:coupon-template:create', 3, 2, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1928 | +# 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`) VALUES (2035, '优惠劵模板更新', 'promotion:coupon-template:update', 3, 3, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1929 | +# 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`) VALUES (2036, '优惠劵模板删除', 'promotion:coupon-template:delete', 3, 4, 2032, '', '', '', 0, b'1', b'1', '', '2022-10-31 22:27:14', '', '2022-10-31 22:27:14', b'0'); | |
| 1930 | +# 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`) VALUES (2038, '会员优惠劵', '', 2, 2, 2030, 'coupon', '', 'mall/promotion/coupon/index', 0, b'0', b'1', '', '2022-11-03 23:21:31', '1', '2022-11-05 12:27:45', b'0'); | |
| 1931 | +# 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`) VALUES (2039, '优惠劵查询', 'promotion:coupon:query', 3, 1, 2038, '', '', '', 0, b'1', b'1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', b'0'); | |
| 1932 | +# 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`) VALUES (2040, '优惠劵删除', 'promotion:coupon:delete', 3, 4, 2038, '', '', '', 0, b'1', b'1', '', '2022-11-03 23:21:31', '', '2022-11-03 23:21:31', b'0'); | |
| 1933 | +# 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`) VALUES (2041, '满减送活动', '', 2, 10, 2030, 'reward-activity', 'radio', 'mall/promotion/rewardActivity/index', 0, b'1', b'1', '', '2022-11-04 23:47:49', '1', '2022-11-05 12:27:56', b'0'); | |
| 1934 | +# 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`) VALUES (2042, '满减送活动查询', 'promotion:reward-activity:query', 3, 1, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', b'0'); | |
| 1935 | +# 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`) VALUES (2043, '满减送活动创建', 'promotion:reward-activity:create', 3, 2, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:49', '', '2022-11-04 23:47:49', b'0'); | |
| 1936 | +# 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`) VALUES (2044, '满减送活动更新', 'promotion:reward-activity:update', 3, 3, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', b'0'); | |
| 1937 | +# 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`) VALUES (2045, '满减送活动删除', 'promotion:reward-activity:delete', 3, 4, 2041, '', '', '', 0, b'1', b'1', '', '2022-11-04 23:47:50', '', '2022-11-04 23:47:50', b'0'); | |
| 1938 | +# 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`) VALUES (2046, '满减送活动关闭', 'promotion:reward-activity:close', 3, 5, 2041, '', '', '', 0, b'1', b'1', '1', '2022-11-05 10:42:53', '1', '2022-11-05 10:42:53', b'0'); | |
| 1939 | +# 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`) VALUES (2047, '限时折扣活动', '', 2, 7, 2030, 'discount-activity', 'time', 'mall/promotion/discountActivity/index', 0, b'1', b'1', '', '2022-11-05 17:12:15', '1', '2022-11-29 22:14:56', b'0'); | |
| 1940 | +# 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`) VALUES (2048, '限时折扣活动查询', 'promotion:discount-activity:query', 3, 1, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', b'0'); | |
| 1941 | +# 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`) VALUES (2049, '限时折扣活动创建', 'promotion:discount-activity:create', 3, 2, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:15', '', '2022-11-05 17:12:15', b'0'); | |
| 1942 | +# 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`) VALUES (2050, '限时折扣活动更新', 'promotion:discount-activity:update', 3, 3, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1943 | +# 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`) VALUES (2051, '限时折扣活动删除', 'promotion:discount-activity:delete', 3, 4, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1944 | +# 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`) VALUES (2052, '限时折扣活动关闭', 'promotion:discount-activity:close', 3, 5, 2047, '', '', '', 0, b'1', b'1', '', '2022-11-05 17:12:16', '', '2022-11-05 17:12:16', b'0'); | |
| 1945 | +# 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`) VALUES (2059, '秒杀活动管理', '', 2, 0, 2030, 'seckill-activity', 'time-range', 'mall/promotion/seckill/seckillActivity/index', 0, b'1', b'1', '', '2022-11-06 22:24:49', '1', '2022-11-29 22:24:39', b'0'); | |
| 1946 | +# 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`) VALUES (2060, '秒杀活动查询', 'promotion:seckill-activity:query', 3, 1, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1947 | +# 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`) VALUES (2061, '秒杀活动创建', 'promotion:seckill-activity:create', 3, 2, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1948 | +# 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`) VALUES (2062, '秒杀活动更新', 'promotion:seckill-activity:update', 3, 3, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1949 | +# 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`) VALUES (2063, '秒杀活动删除', 'promotion:seckill-activity:delete', 3, 4, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1950 | +# 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`) VALUES (2064, '秒杀活动导出', 'promotion:seckill-activity:export', 3, 5, 2059, '', '', '', 0, b'1', b'1', '', '2022-11-06 22:24:49', '', '2022-11-06 22:24:49', b'0'); | |
| 1951 | +# 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`) VALUES (2066, '秒杀时段管理', '', 2, 0, 2030, 'seckill-time', '', 'mall/promotion/seckill/seckillTime/index', 0, b'0', b'1', '', '2022-11-15 19:46:50', '1', '2022-11-29 22:09:03', b'0'); | |
| 1952 | +# 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`) VALUES (2067, '秒杀时段查询', 'promotion:seckill-time:query', 3, 1, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1953 | +# 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`) VALUES (2068, '秒杀时段创建', 'promotion:seckill-time:create', 3, 2, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1954 | +# 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`) VALUES (2069, '秒杀时段更新', 'promotion:seckill-time:update', 3, 3, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1955 | +# 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`) VALUES (2070, '秒杀时段删除', 'promotion:seckill-time:delete', 3, 4, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1956 | +# 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`) VALUES (2071, '秒杀时段导出', 'promotion:seckill-time:export', 3, 5, 2066, '', '', '', 0, b'1', b'1', '', '2022-11-15 19:46:51', '', '2022-11-15 19:46:51', b'0'); | |
| 1957 | +# 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`) VALUES (2072, '订单中心', '', 1, 65, 0, '/trade', 'order', NULL, 0, b'1', b'1', '1', '2022-11-19 18:57:19', '1', '2022-12-10 16:32:57', b'0'); | |
| 1958 | +# 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`) VALUES (2073, '售后退款', '', 2, 1, 2072, 'trade/after-sale', 'education', 'mall/trade/afterSale/index', 0, b'1', b'1', '', '2022-11-19 20:15:32', '1', '2022-12-10 21:11:02', b'0'); | |
| 1959 | +# 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`) VALUES (2074, '售后查询', 'trade:after-sale:query', 3, 1, 2073, '', '', '', 0, b'1', b'1', '', '2022-11-19 20:15:33', '1', '2022-12-10 21:04:29', b'0'); | |
| 1960 | +# 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`) VALUES (2075, '秒杀活动关闭', 'promotion:sekill-activity:close', 3, 6, 2059, '', '', '', 0, b'1', b'1', '1', '2022-11-28 20:20:15', '1', '2022-11-28 20:20:15', b'0'); | |
| 1961 | +# 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`) VALUES (2076, '订单列表', '', 2, 0, 2072, 'trade/order', 'list', 'mall/trade/order/index', 0, b'1', b'1', '1', '2022-12-10 21:05:44', '1', '2022-12-10 21:08:44', b'0'); | |
| 1962 | +# 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`) VALUES (2077, '物流公司管理管理', '', 2, 0, 2072, 'express-company', '', 'mall/trade/expressCompany/index', 0, b'1', b'1', '', '2022-12-20 23:27:55', '1', '2022-12-20 23:36:20', b'0'); | |
| 1963 | +# 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`) VALUES (2078, '物流公司管理查询', 'trade:express-company:query', 3, 1, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1964 | +# 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`) VALUES (2079, '物流公司管理创建', 'trade:express-company:create', 3, 2, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1965 | +# 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`) VALUES (2080, '物流公司管理更新', 'trade:express-company:update', 3, 3, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1966 | +# 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`) VALUES (2081, '物流公司管理删除', 'trade:express-company:delete', 3, 4, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1967 | +# 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`) VALUES (2082, '物流公司管理导出', 'trade:express-company:export', 3, 5, 2077, '', '', '', 0, b'1', b'1', '', '2022-12-20 23:27:55', '', '2022-12-20 23:27:55', b'0'); | |
| 1864 | 1968 | 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`) VALUES (2083, '地区管理', '', 2, 14, 1, 'area', 'row', 'system/area/index', 0, b'1', b'1', '1', '2022-12-23 17:35:05', '1', '2022-12-23 17:35:48', b'0'); |
| 1865 | 1969 | 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`) VALUES (2084, '公众号管理', '', 1, 100, 0, '/mp', 'wechat', NULL, 0, b'1', b'1', '1', '2023-01-01 20:11:04', '1', '2023-01-15 11:28:57', b'0'); |
| 1866 | 1970 | 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`) VALUES (2085, '账号管理', 'mp:account:query', 2, 1, 2084, 'account', 'phone', 'mp/account/index', 0, b'1', b'1', '1', '2023-01-01 20:13:31', '1', '2023-01-01 20:14:39', b'0'); |
| ... | ... | @@ -1877,7 +1981,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 1877 | 1981 | 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`) VALUES (2096, '修改标签', 'mp:tag:update', 3, 2, 2093, '', '', '', 0, b'1', b'1', '1', '2023-01-08 11:59:41', '1', '2023-01-08 11:59:41', b'0'); |
| 1878 | 1982 | 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`) VALUES (2097, '删除标签', 'mp:tag:delete', 3, 3, 2093, '', '', '', 0, b'1', b'1', '1', '2023-01-08 12:00:04', '1', '2023-01-08 12:00:13', b'0'); |
| 1879 | 1983 | 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`) VALUES (2098, '同步标签', 'mp:tag:sync', 3, 4, 2093, '', '', '', 0, b'1', b'1', '1', '2023-01-08 12:00:29', '1', '2023-01-08 12:00:29', b'0'); |
| 1880 | -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`) VALUES (2099, '粉丝管理', '', 2, 4, 2084, 'user', 'people', 'mp/user/index', 0, b'1', b'1', '1', '2023-01-08 16:51:20', '1', '2023-01-08 16:56:19', b'0'); | |
| 1984 | +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`) VALUES (2099, '粉丝管理', '', 2, 4, 2084, 'mpuser', 'people', 'mp/mpuser/index', 0, b'1', b'1', '1', '2023-01-08 16:51:20', '1', '2023-01-08 16:56:19', b'0'); | |
| 1881 | 1985 | 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`) VALUES (2100, '查询粉丝', 'mp:user:query', 3, 0, 2099, '', '', '', 0, b'1', b'1', '1', '2023-01-08 17:16:59', '1', '2023-01-08 17:17:23', b'0'); |
| 1882 | 1986 | 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`) VALUES (2101, '修改粉丝', 'mp:user:update', 3, 1, 2099, '', '', '', 0, b'1', b'1', '1', '2023-01-08 17:17:11', '1', '2023-01-08 17:17:11', b'0'); |
| 1883 | 1987 | 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`) VALUES (2102, '同步粉丝', 'mp:user:sync', 3, 2, 2099, '', '', '', 0, b'1', b'1', '1', '2023-01-08 17:17:40', '1', '2023-01-08 17:17:40', b'0'); |
| ... | ... | @@ -1908,6 +2012,29 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 1908 | 2012 | 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`) VALUES (2127, '删除菜单', 'mp:menu:delete', 3, 2, 2119, '', '', '', 0, b'1', b'1', '1', '2023-01-17 23:06:16', '1', '2023-01-17 23:06:16', b'0'); |
| 1909 | 2013 | 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`) VALUES (2128, '查询消息', 'mp:message:query', 3, 0, 2103, '', '', '', 0, b'1', b'1', '1', '2023-01-17 23:07:14', '1', '2023-01-17 23:07:14', b'0'); |
| 1910 | 2014 | 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`) VALUES (2129, '发送消息', 'mp:message:send', 3, 1, 2103, '', '', '', 0, b'1', b'1', '1', '2023-01-17 23:07:26', '1', '2023-01-17 23:07:26', b'0'); |
| 2015 | +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`) VALUES (2130, '邮箱管理', '', 2, 11, 1, 'mail', 'email', NULL, 0, b'1', b'1', '1', '2023-01-25 17:27:44', '1', '2023-01-25 17:27:44', b'0'); | |
| 2016 | +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`) VALUES (2131, '邮箱账号', '', 2, 0, 2130, 'mail-account', 'user', 'system/mail/account/index', 0, b'1', b'1', '', '2023-01-25 09:33:48', '1', '2023-01-26 16:37:37', b'0'); | |
| 2017 | +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`) VALUES (2132, '账号查询', 'system:mail-account:query', 3, 1, 2131, '', '', '', 0, b'1', b'1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', b'0'); | |
| 2018 | +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`) VALUES (2133, '账号创建', 'system:mail-account:create', 3, 2, 2131, '', '', '', 0, b'1', b'1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', b'0'); | |
| 2019 | +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`) VALUES (2134, '账号更新', 'system:mail-account:update', 3, 3, 2131, '', '', '', 0, b'1', b'1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', b'0'); | |
| 2020 | +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`) VALUES (2135, '账号删除', 'system:mail-account:delete', 3, 4, 2131, '', '', '', 0, b'1', b'1', '', '2023-01-25 09:33:48', '', '2023-01-25 09:33:48', b'0'); | |
| 2021 | +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`) VALUES (2136, '邮件模版', '', 2, 0, 2130, 'mail-template', 'education', 'system/mail/template/index', 0, b'1', b'1', '', '2023-01-25 12:05:31', '1', '2023-01-26 16:38:35', b'0'); | |
| 2022 | +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`) VALUES (2137, '模版查询', 'system:mail-template:query', 3, 1, 2136, '', '', '', 0, b'1', b'1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', b'0'); | |
| 2023 | +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`) VALUES (2138, '模版创建', 'system:mail-template:create', 3, 2, 2136, '', '', '', 0, b'1', b'1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', b'0'); | |
| 2024 | +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`) VALUES (2139, '模版更新', 'system:mail-template:update', 3, 3, 2136, '', '', '', 0, b'1', b'1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', b'0'); | |
| 2025 | +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`) VALUES (2140, '模版删除', 'system:mail-template:delete', 3, 4, 2136, '', '', '', 0, b'1', b'1', '', '2023-01-25 12:05:31', '', '2023-01-25 12:05:31', b'0'); | |
| 2026 | +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`) VALUES (2141, '邮件记录', '', 2, 0, 2130, 'mail-log', 'log', 'system/mail/log/index', 0, b'1', b'1', '', '2023-01-26 02:16:50', '1', '2023-01-26 16:38:27', b'0'); | |
| 2027 | +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`) VALUES (2142, '日志查询', 'system:mail-log:query', 3, 1, 2141, '', '', '', 0, b'1', b'1', '', '2023-01-26 02:16:50', '', '2023-01-26 02:16:50', b'0'); | |
| 2028 | +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`) VALUES (2143, '发送测试邮件', 'system:mail-template:send-mail', 3, 5, 2136, '', '', '', 0, b'1', b'1', '1', '2023-01-26 23:29:15', '1', '2023-01-26 23:29:15', b'0'); | |
| 2029 | +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`) VALUES (2144, '站内信管理', '', 1, 11, 1, 'notify', 'message', NULL, 0, b'1', b'1', '1', '2023-01-28 10:25:18', '1', '2023-01-28 10:25:46', b'0'); | |
| 2030 | +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`) VALUES (2145, '模板管理', '', 2, 0, 2144, 'notify-template', 'education', 'system/notify/template/index', 0, b'1', b'1', '', '2023-01-28 02:26:42', '1', '2023-01-28 10:27:47', b'0'); | |
| 2031 | +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`) VALUES (2146, '站内信模板查询', 'system:notify-template:query', 3, 1, 2145, '', '', '', 0, b'1', b'1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', b'0'); | |
| 2032 | +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`) VALUES (2147, '站内信模板创建', 'system:notify-template:create', 3, 2, 2145, '', '', '', 0, b'1', b'1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', b'0'); | |
| 2033 | +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`) VALUES (2148, '站内信模板更新', 'system:notify-template:update', 3, 3, 2145, '', '', '', 0, b'1', b'1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', b'0'); | |
| 2034 | +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`) VALUES (2149, '站内信模板删除', 'system:notify-template:delete', 3, 4, 2145, '', '', '', 0, b'1', b'1', '', '2023-01-28 02:26:42', '', '2023-01-28 02:26:42', b'0'); | |
| 2035 | +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`) VALUES (2150, '发送测试站内信', 'system:notify-template:send-notify', 3, 5, 2145, '', '', '', 0, b'1', b'1', '1', '2023-01-28 10:54:43', '1', '2023-01-28 10:54:43', b'0'); | |
| 2036 | +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`) VALUES (2151, '消息记录', '', 2, 0, 2144, 'notify-message', 'edit', 'system/notify/message/index', 0, b'1', b'1', '', '2023-01-28 04:28:22', '1', '2023-01-28 20:59:53', b'0'); | |
| 2037 | +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`) VALUES (2152, '站内信消息查询', 'system:notify-message:query', 3, 1, 2151, '', '', '', 0, b'1', b'1', '', '2023-01-28 04:28:22', '', '2023-01-28 04:28:22', b'0'); | |
| 1911 | 2038 | COMMIT; |
| 1912 | 2039 | |
| 1913 | 2040 | -- ---------------------------- |
| ... | ... | @@ -1939,6 +2066,72 @@ INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creato |
| 1939 | 2066 | COMMIT; |
| 1940 | 2067 | |
| 1941 | 2068 | -- ---------------------------- |
| 2069 | +-- Table structure for system_notify_message | |
| 2070 | +-- ---------------------------- | |
| 2071 | +DROP TABLE IF EXISTS `system_notify_message`; | |
| 2072 | +CREATE TABLE `system_notify_message` ( | |
| 2073 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID', | |
| 2074 | + `user_id` bigint NOT NULL COMMENT '用户id', | |
| 2075 | + `user_type` tinyint NOT NULL COMMENT '用户类型', | |
| 2076 | + `template_id` bigint NOT NULL COMMENT '模版编号', | |
| 2077 | + `template_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板编码', | |
| 2078 | + `template_nickname` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模版发送人名称', | |
| 2079 | + `template_content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模版内容', | |
| 2080 | + `template_type` int NOT NULL COMMENT '模版类型', | |
| 2081 | + `template_params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模版参数', | |
| 2082 | + `read_status` bit(1) NOT NULL COMMENT '是否已读', | |
| 2083 | + `read_time` datetime NULL DEFAULT NULL COMMENT '阅读时间', | |
| 2084 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 2085 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 2086 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 2087 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 2088 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 2089 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 2090 | + PRIMARY KEY (`id`) USING BTREE | |
| 2091 | +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '站内信消息表'; | |
| 2092 | + | |
| 2093 | +-- ---------------------------- | |
| 2094 | +-- Records of system_notify_message | |
| 2095 | +-- ---------------------------- | |
| 2096 | +BEGIN; | |
| 2097 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{\"name\":\"1\",\"what\":\"2\"}', b'0', '2023-01-28 21:06:10', '1', '2023-01-28 11:44:08', '1', '2023-01-29 02:51:50', b'0', 1); | |
| 2098 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 1, 2, 1, 'test', '123', '我是 1,我开始 2 了', 1, '{\"name\":\"1\",\"what\":\"2\"}', b'0', '2023-01-29 10:34:13', '1', '2023-01-28 11:45:04', '1', '2023-01-29 02:51:52', b'0', 1); | |
| 2099 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, 103, 2, 2, 'register', '系统消息', '你好,欢迎 哈哈 加入大家庭!', 2, '{\"name\":\"哈哈\"}', b'0', NULL, '1', '2023-01-28 21:02:20', '1', '2023-01-28 21:02:20', b'0', 1); | |
| 2100 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{\"name\":\"芋艿\",\"what\":\"写代码\"}', b'0', '2023-01-29 10:41:45', '1', '2023-01-28 22:21:42', '1', '2023-01-29 02:51:54', b'0', 1); | |
| 2101 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 1, 2, 1, 'test', '123', '我是 芋艿,我开始 写代码 了', 1, '{\"name\":\"芋艿\",\"what\":\"写代码\"}', b'1', '2023-01-29 10:52:06', '1', '2023-01-28 22:22:07', '1', '2023-01-29 10:52:06', b'0', 1); | |
| 2102 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 1, 2, 1, 'test', '123', '我是 2,我开始 3 了', 1, '{\"name\":\"2\",\"what\":\"3\"}', b'1', '2023-01-29 10:52:06', '1', '2023-01-28 23:45:21', '1', '2023-01-29 10:52:06', b'0', 1); | |
| 2103 | +INSERT INTO `system_notify_message` (`id`, `user_id`, `user_type`, `template_id`, `template_code`, `template_nickname`, `template_content`, `template_type`, `template_params`, `read_status`, `read_time`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 1, 2, 2, 'register', '系统消息', '你好,欢迎 123 加入大家庭!', 2, '{\"name\":\"123\"}', b'1', '2023-01-29 10:52:06', '1', '2023-01-28 23:50:21', '1', '2023-01-29 10:52:06', b'0', 1); | |
| 2104 | +COMMIT; | |
| 2105 | + | |
| 2106 | +-- ---------------------------- | |
| 2107 | +-- Table structure for system_notify_template | |
| 2108 | +-- ---------------------------- | |
| 2109 | +DROP TABLE IF EXISTS `system_notify_template`; | |
| 2110 | +CREATE TABLE `system_notify_template` ( | |
| 2111 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 2112 | + `name` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板名称', | |
| 2113 | + `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模版编码', | |
| 2114 | + `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '发送人名称', | |
| 2115 | + `content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模版内容', | |
| 2116 | + `type` tinyint NOT NULL COMMENT '类型', | |
| 2117 | + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '参数数组', | |
| 2118 | + `status` tinyint NOT NULL COMMENT '状态', | |
| 2119 | + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', | |
| 2120 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 2121 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 2122 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 2123 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 2124 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 2125 | + PRIMARY KEY (`id`) USING BTREE | |
| 2126 | +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '站内信模板表'; | |
| 2127 | + | |
| 2128 | +-- ---------------------------- | |
| 2129 | +-- Records of system_notify_template | |
| 2130 | +-- ---------------------------- | |
| 2131 | +BEGIN; | |
| 2132 | +COMMIT; | |
| 2133 | + | |
| 2134 | +-- ---------------------------- | |
| 1942 | 2135 | -- Table structure for system_oauth2_access_token |
| 1943 | 2136 | -- ---------------------------- |
| 1944 | 2137 | DROP TABLE IF EXISTS `system_oauth2_access_token`; |
| ... | ... | @@ -1958,7 +2151,7 @@ CREATE TABLE `system_oauth2_access_token` ( |
| 1958 | 2151 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1959 | 2152 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 1960 | 2153 | PRIMARY KEY (`id`) USING BTREE |
| 1961 | -) ENGINE = InnoDB AUTO_INCREMENT = 1083 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2154 | +) ENGINE = InnoDB AUTO_INCREMENT = 1249 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 1962 | 2155 | |
| 1963 | 2156 | -- ---------------------------- |
| 1964 | 2157 | -- Records of system_oauth2_access_token |
| ... | ... | @@ -2080,7 +2273,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( |
| 2080 | 2273 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2081 | 2274 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2082 | 2275 | PRIMARY KEY (`id`) USING BTREE |
| 2083 | -) ENGINE = InnoDB AUTO_INCREMENT = 571 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2276 | +) ENGINE = InnoDB AUTO_INCREMENT = 593 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2084 | 2277 | |
| 2085 | 2278 | -- ---------------------------- |
| 2086 | 2279 | -- Records of system_oauth2_refresh_token |
| ... | ... | @@ -2120,7 +2313,7 @@ CREATE TABLE `system_operate_log` ( |
| 2120 | 2313 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2121 | 2314 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2122 | 2315 | PRIMARY KEY (`id`) USING BTREE |
| 2123 | -) ENGINE = InnoDB AUTO_INCREMENT = 4018 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; | |
| 2316 | +) ENGINE = InnoDB AUTO_INCREMENT = 4245 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; | |
| 2124 | 2317 | |
| 2125 | 2318 | -- ---------------------------- |
| 2126 | 2319 | -- Records of system_operate_log |
| ... | ... | @@ -2212,7 +2405,7 @@ CREATE TABLE `system_role_menu` ( |
| 2212 | 2405 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2213 | 2406 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2214 | 2407 | PRIMARY KEY (`id`) USING BTREE |
| 2215 | -) ENGINE = InnoDB AUTO_INCREMENT = 1991 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2408 | +) ENGINE = InnoDB AUTO_INCREMENT = 2185 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2216 | 2409 | |
| 2217 | 2410 | -- ---------------------------- |
| 2218 | 2411 | -- Records of system_role_menu |
| ... | ... | @@ -2628,6 +2821,194 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 2628 | 2821 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1988, 118, 1018, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', b'0', 129); |
| 2629 | 2822 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1989, 118, 1019, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', b'0', 129); |
| 2630 | 2823 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1990, 118, 1020, '1', '2022-12-30 11:47:52', '1', '2022-12-30 11:47:52', b'0', 129); |
| 2824 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1991, 2, 1024, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2825 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1992, 2, 1025, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2826 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1993, 2, 1026, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2827 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1994, 2, 1027, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2828 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1995, 2, 1028, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2829 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1996, 2, 1029, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2830 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1997, 2, 1030, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2831 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1998, 2, 1031, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2832 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1999, 2, 1032, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2833 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2000, 2, 1033, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2834 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2001, 2, 1034, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2835 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2002, 2, 1035, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2836 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2003, 2, 1036, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2837 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2004, 2, 1037, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2838 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2005, 2, 1038, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2839 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2006, 2, 1039, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2840 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2007, 2, 1040, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2841 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2008, 2, 1042, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2842 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2009, 2, 1043, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2843 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2010, 2, 1045, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2844 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2011, 2, 1046, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2845 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2012, 2, 1048, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2846 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2013, 2, 1050, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2847 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2014, 2, 1051, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2848 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2015, 2, 1052, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2849 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2016, 2, 1053, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2850 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2017, 2, 1054, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2851 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2018, 2, 1056, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2852 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2019, 2, 1057, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2853 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2020, 2, 1058, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2854 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2021, 2, 2083, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2855 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2022, 2, 1059, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2856 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2023, 2, 1060, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2857 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2024, 2, 1063, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2858 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2025, 2, 1064, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2859 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2026, 2, 1065, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2860 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2027, 2, 1066, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2861 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2028, 2, 1067, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2862 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2029, 2, 1070, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2863 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2030, 2, 1071, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2864 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2031, 2, 1072, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2865 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2032, 2, 1073, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2866 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2033, 2, 1074, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2867 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2034, 2, 1075, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2868 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2035, 2, 1076, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2869 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2036, 2, 1082, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2870 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2037, 2, 1085, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2871 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2038, 2, 1086, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2872 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2039, 2, 1087, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2873 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2040, 2, 1088, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2874 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2041, 2, 1089, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2875 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2042, 2, 1091, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2876 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2043, 2, 1092, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2877 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2044, 2, 1095, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2878 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2045, 2, 1096, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2879 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2046, 2, 1097, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2880 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2047, 2, 1098, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2881 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2048, 2, 1101, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2882 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2049, 2, 1102, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2883 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2050, 2, 1103, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2884 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2051, 2, 1104, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2885 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2052, 2, 1105, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2886 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2053, 2, 1106, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2887 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2054, 2, 1108, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2888 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2055, 2, 1109, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2889 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2056, 2, 1111, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2890 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2057, 2, 1112, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2891 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2058, 2, 1113, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2892 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2059, 2, 1114, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2893 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2060, 2, 1115, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2894 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2061, 2, 1127, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2895 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2062, 2, 1128, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2896 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2063, 2, 1129, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2897 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2064, 2, 1130, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2898 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2065, 2, 1131, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2899 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2066, 2, 1132, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2900 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2067, 2, 1133, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2901 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2068, 2, 1134, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2902 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2069, 2, 1135, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2903 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2070, 2, 1136, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2904 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2071, 2, 1137, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2905 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2072, 2, 114, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2906 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2073, 2, 1139, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2907 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2074, 2, 115, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2908 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2075, 2, 1140, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2909 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2076, 2, 116, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2910 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2077, 2, 1141, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2911 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2078, 2, 1142, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2912 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2079, 2, 1143, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2913 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2080, 2, 1150, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2914 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2081, 2, 1161, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2915 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2082, 2, 1162, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2916 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2083, 2, 1163, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2917 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2084, 2, 1164, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2918 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2085, 2, 1165, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2919 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2086, 2, 1166, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2920 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2087, 2, 1173, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2921 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2088, 2, 1174, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2922 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2089, 2, 1175, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2923 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2090, 2, 1176, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2924 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2091, 2, 1177, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2925 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2092, 2, 1178, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2926 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2093, 2, 1179, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2927 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2094, 2, 1180, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2928 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2095, 2, 1181, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2929 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2096, 2, 1182, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2930 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2097, 2, 1183, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2931 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2098, 2, 1184, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2932 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2099, 2, 1226, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2933 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2100, 2, 1227, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2934 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2101, 2, 1228, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2935 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2102, 2, 1229, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2936 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2103, 2, 1237, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2937 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2104, 2, 1238, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2938 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2105, 2, 1239, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2939 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2106, 2, 1240, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2940 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2107, 2, 1241, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2941 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2108, 2, 1242, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2942 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2109, 2, 1243, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2943 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2110, 2, 1247, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2944 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2111, 2, 1248, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2945 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2112, 2, 1249, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2946 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2113, 2, 1250, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2947 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2114, 2, 1251, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2948 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2115, 2, 1252, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2949 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2116, 2, 1254, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2950 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2117, 2, 1255, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2951 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2118, 2, 1256, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2952 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2119, 2, 1257, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2953 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2120, 2, 1258, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2954 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2121, 2, 1259, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2955 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2122, 2, 1260, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2956 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2123, 2, 1261, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2957 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2124, 2, 1263, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2958 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2125, 2, 1264, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2959 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2126, 2, 1265, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2960 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2127, 2, 1266, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2961 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2128, 2, 1267, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2962 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2129, 2, 1001, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2963 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2130, 2, 1002, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2964 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2131, 2, 1003, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2965 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2132, 2, 1004, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2966 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2133, 2, 1005, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2967 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2134, 2, 1006, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2968 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2135, 2, 1007, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2969 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2136, 2, 1008, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2970 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2137, 2, 1009, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2971 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2138, 2, 1010, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2972 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2139, 2, 1011, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2973 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2140, 2, 1012, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2974 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2141, 2, 1013, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2975 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2142, 2, 1014, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2976 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2143, 2, 1015, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2977 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2144, 2, 1016, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2978 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2145, 2, 1017, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2979 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2146, 2, 1018, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2980 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2147, 2, 1019, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2981 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2148, 2, 1020, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2982 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2149, 2, 1021, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2983 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2150, 2, 1022, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2984 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2151, 2, 1023, '1', '2023-01-25 08:42:52', '1', '2023-01-25 08:42:52', b'0', 1); | |
| 2985 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2152, 2, 1281, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2986 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2153, 2, 1282, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2987 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2154, 2, 2000, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2988 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2155, 2, 2002, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2989 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2156, 2, 2003, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2990 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2157, 2, 2004, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2991 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2158, 2, 2005, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2992 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2159, 2, 2006, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2993 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2160, 2, 2008, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2994 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2161, 2, 2009, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2995 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2162, 2, 2010, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2996 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2163, 2, 2011, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2997 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2164, 2, 2012, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2998 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2170, 2, 2019, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 2999 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2171, 2, 2020, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3000 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2172, 2, 2021, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3001 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2173, 2, 2022, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3002 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2174, 2, 2023, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3003 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2175, 2, 2025, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3004 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2177, 2, 2027, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3005 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2178, 2, 2028, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3006 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2179, 2, 2029, '1', '2023-01-25 08:42:58', '1', '2023-01-25 08:42:58', b'0', 1); | |
| 3007 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2180, 2, 2014, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', b'0', 1); | |
| 3008 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2181, 2, 2015, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', b'0', 1); | |
| 3009 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2182, 2, 2016, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', b'0', 1); | |
| 3010 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2183, 2, 2017, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', b'0', 1); | |
| 3011 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2184, 2, 2018, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', b'0', 1); | |
| 2631 | 3012 | COMMIT; |
| 2632 | 3013 | |
| 2633 | 3014 | -- ---------------------------- |
| ... | ... | @@ -2752,7 +3133,7 @@ CREATE TABLE `system_sms_log` ( |
| 2752 | 3133 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 2753 | 3134 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2754 | 3135 | PRIMARY KEY (`id`) USING BTREE |
| 2755 | -) ENGINE = InnoDB AUTO_INCREMENT = 339 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 3136 | +) ENGINE = InnoDB AUTO_INCREMENT = 347 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 2756 | 3137 | |
| 2757 | 3138 | -- ---------------------------- |
| 2758 | 3139 | -- Records of system_sms_log |
| ... | ... | @@ -3050,7 +3431,7 @@ CREATE TABLE `system_users` ( |
| 3050 | 3431 | -- Records of system_users |
| 3051 | 3432 | -- ---------------------------- |
| 3052 | 3433 | BEGIN; |
| 3053 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '15612345678', 1, 'http://test.yudao.iocoder.cn/e1fdd7271685ec143a0900681606406621717a666ad0b2798b096df41422b32f.png', 0, '127.0.0.1', '2023-01-17 12:33:07', 'admin', '2021-01-05 17:03:47', NULL, '2023-01-17 12:33:07', b'0', 1); | |
| 3434 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '15612345678', 1, 'http://test.yudao.iocoder.cn/e1fdd7271685ec143a0900681606406621717a666ad0b2798b096df41422b32f.png', 0, '127.0.0.1', '2023-01-29 10:05:18', 'admin', '2021-01-05 17:03:47', NULL, '2023-01-29 10:05:18', b'0', 1); | |
| 3054 | 3435 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); |
| 3055 | 3436 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '127.0.0.1', '2022-07-08 01:26:27', '', '2021-01-13 23:50:35', NULL, '2022-07-08 01:26:27', b'0', 1); |
| 3056 | 3437 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$10$GP8zvqHB//TekuzYZSBYAuBQJiNq1.fxQVDYJ.uBCOnWCtDVKE4H6', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '127.0.0.1', '2022-05-28 15:43:17', '', '2021-01-21 02:13:53', NULL, '2022-07-09 09:00:33', b'0', 1); | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -14,9 +14,9 @@ |
| 14 | 14 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 15 | 15 | |
| 16 | 16 | <properties> |
| 17 | - <revision>1.6.6-snapshot</revision> | |
| 17 | + <revision>1.7.0-snapshot</revision> | |
| 18 | 18 | <!-- 统一依赖管理 --> |
| 19 | - <spring.boot.version>2.7.7</spring.boot.version> | |
| 19 | + <spring.boot.version>2.7.8</spring.boot.version> | |
| 20 | 20 | <!-- Web 相关 --> |
| 21 | 21 | <knife4j.version>4.0.0</knife4j.version> |
| 22 | 22 | <swagger-annotations.version>1.6.8</swagger-annotations.version> |
| ... | ... | @@ -41,12 +41,12 @@ |
| 41 | 41 | <!-- Bpm 工作流相关 --> |
| 42 | 42 | <flowable.version>6.8.0</flowable.version> |
| 43 | 43 | <!-- 工具类相关 --> |
| 44 | - <captcha-plus.version>1.0.1</captcha-plus.version> | |
| 44 | + <captcha-plus.version>1.0.2</captcha-plus.version> | |
| 45 | 45 | <jsoup.version>1.15.3</jsoup.version> |
| 46 | 46 | <lombok.version>1.18.24</lombok.version> |
| 47 | 47 | <mapstruct.version>1.5.3.Final</mapstruct.version> |
| 48 | 48 | <hutool.version>5.8.11</hutool.version> |
| 49 | - <easyexcel.verion>3.1.5</easyexcel.verion> | |
| 49 | + <easyexcel.verion>3.2.0</easyexcel.verion> | |
| 50 | 50 | <velocity.version>2.3</velocity.version> |
| 51 | 51 | <screw.version>1.0.5</screw.version> |
| 52 | 52 | <fastjson.version>1.2.83</fastjson.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.7</spring.boot.version> | |
| 24 | + <spring.boot.version>2.7.8</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.7</spring.boot.version> | |
| 24 | + <spring.boot.version>2.7.8</spring.boot.version> | |
| 25 | 25 | </properties> |
| 26 | 26 | |
| 27 | 27 | <dependencyManagement> | ... | ... |
yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java
| ... | ... | @@ -40,6 +40,10 @@ public class BannerApplicationRunner implements ApplicationRunner { |
| 40 | 40 | if (isNotPresent("cn.iocoder.yudao.framework.flowable.config.YudaoFlowableConfiguration")) { |
| 41 | 41 | System.out.println("[工作流模块 yudao-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]"); |
| 42 | 42 | } |
| 43 | + // 微信公众号 | |
| 44 | + if (isNotPresent("cn.iocoder.yudao.module.mp.framework.mp.config.MpConfiguration")) { | |
| 45 | + System.out.println("[微信公众号 yudao-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]"); | |
| 46 | + } | |
| 43 | 47 | }); |
| 44 | 48 | } |
| 45 | 49 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java
| 1 | 1 | package cn.iocoder.yudao.framework.mybatis.core.query; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.lang.Assert; | |
| 3 | 4 | import cn.hutool.core.util.ArrayUtil; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.enums.SqlConstants; | |
| 5 | 7 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 6 | 8 | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| 7 | 9 | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/QueryWrapperX.java
| ... | ... | @@ -146,19 +146,19 @@ public class QueryWrapperX<T> extends QueryWrapper<T> { |
| 146 | 146 | * |
| 147 | 147 | * @return this |
| 148 | 148 | */ |
| 149 | - public QueryWrapperX<T> limit1() { | |
| 149 | + public QueryWrapperX<T> limitN(int n) { | |
| 150 | 150 | Assert.notNull(SqlConstants.DB_TYPE, "获取不到数据库的类型"); |
| 151 | 151 | switch (SqlConstants.DB_TYPE) { |
| 152 | 152 | case ORACLE: |
| 153 | 153 | case ORACLE_12C: |
| 154 | - super.eq("ROWNUM", 1); | |
| 154 | + super.eq("ROWNUM", n); | |
| 155 | 155 | break; |
| 156 | 156 | case SQL_SERVER: |
| 157 | 157 | case SQL_SERVER2005: |
| 158 | - super.select("TOP 1 *"); // 由于 SQL Server 是通过 SELECT TOP 1 实现限制一条,所以只好使用 * 查询剩余字段 | |
| 158 | + super.select("TOP " + n + " *"); // 由于 SQL Server 是通过 SELECT TOP 1 实现限制一条,所以只好使用 * 查询剩余字段 | |
| 159 | 159 | break; |
| 160 | 160 | default: |
| 161 | - super.last("LIMIT 1"); | |
| 161 | + super.last("LIMIT " + n); | |
| 162 | 162 | } |
| 163 | 163 | return this; |
| 164 | 164 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java
| ... | ... | @@ -7,7 +7,10 @@ import cn.hutool.core.util.StrUtil; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 8 | 8 | import uk.co.jemos.podam.api.PodamFactory; |
| 9 | 9 | import uk.co.jemos.podam.api.PodamFactoryImpl; |
| 10 | +import uk.co.jemos.podam.common.AttributeStrategy; | |
| 10 | 11 | |
| 12 | +import javax.validation.constraints.Email; | |
| 13 | +import java.lang.annotation.Annotation; | |
| 11 | 14 | import java.lang.reflect.Type; |
| 12 | 15 | import java.time.LocalDateTime; |
| 13 | 16 | import java.util.Arrays; |
| ... | ... | @@ -95,6 +98,10 @@ public class RandomUtils { |
| 95 | 98 | return RandomUtil.randomEle(CommonStatusEnum.values()).getStatus(); |
| 96 | 99 | } |
| 97 | 100 | |
| 101 | + public static String randomEmail() { | |
| 102 | + return randomString() + "@qq.com"; | |
| 103 | + } | |
| 104 | + | |
| 98 | 105 | @SafeVarargs |
| 99 | 106 | public static <T> T randomPojo(Class<T> clazz, Consumer<T>... consumers) { |
| 100 | 107 | T pojo = PODAM_FACTORY.manufacturePojo(clazz); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java
| ... | ... | @@ -79,7 +79,7 @@ public class TestDemoServiceImpl implements TestDemoService { |
| 79 | 79 | |
| 80 | 80 | @Override |
| 81 | 81 | public PageResult<TestDemoDO> getTestDemoPage(TestDemoPageReqVO pageReqVO) { |
| 82 | -// testDemoMapper.selectList2(); | |
| 82 | + testDemoMapper.selectList2(); | |
| 83 | 83 | return testDemoMapper.selectPage(pageReqVO); |
| 84 | 84 | } |
| 85 | 85 | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.api.mail.dto.MailSendSingleToUserReqDTO; | |
| 4 | + | |
| 5 | +import javax.validation.Valid; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 邮箱发送 API 接口 | |
| 9 | + * | |
| 10 | + * @author 芋道源码 | |
| 11 | + */ | |
| 12 | +public interface MailSendApi { | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 发送单条邮箱给 Admin 用户 | |
| 16 | + * | |
| 17 | + * 在 mail 为空时,使用 userId 加载对应 Admin 的邮箱 | |
| 18 | + * | |
| 19 | + * @param reqDTO 发送请求 | |
| 20 | + * @return 发送日志编号 | |
| 21 | + */ | |
| 22 | + Long sendSingleMailToAdmin(@Valid MailSendSingleToUserReqDTO reqDTO); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 发送单条邮箱给 Member 用户 | |
| 26 | + * | |
| 27 | + * 在 mail 为空时,使用 userId 加载对应 Member 的邮箱 | |
| 28 | + * | |
| 29 | + * @param reqDTO 发送请求 | |
| 30 | + * @return 发送日志编号 | |
| 31 | + */ | |
| 32 | + Long sendSingleMailToMember(@Valid MailSendSingleToUserReqDTO reqDTO); | |
| 33 | + | |
| 34 | +} | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.mail.dto; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import javax.validation.constraints.Email; | |
| 6 | +import javax.validation.constraints.NotNull; | |
| 7 | +import java.util.Map; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 邮件发送 Request DTO | |
| 11 | + * | |
| 12 | + * @author wangjingqi | |
| 13 | + */ | |
| 14 | +@Data | |
| 15 | +public class MailSendSingleToUserReqDTO { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 用户编号 | |
| 19 | + */ | |
| 20 | + private Long userId; | |
| 21 | + /** | |
| 22 | + * 邮箱 | |
| 23 | + */ | |
| 24 | ||
| 25 | + private String mail; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 邮件模板编号 | |
| 29 | + */ | |
| 30 | + @NotNull(message = "邮件模板编号不能为空") | |
| 31 | + private String templateCode; | |
| 32 | + /** | |
| 33 | + * 邮件模板参数 | |
| 34 | + */ | |
| 35 | + private Map<String, Object> templateParams; | |
| 36 | + | |
| 37 | +} | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; | |
| 4 | + | |
| 5 | +import javax.validation.Valid; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 站内信发送 API 接口 | |
| 9 | + * | |
| 10 | + * @author xrcoder | |
| 11 | + */ | |
| 12 | +public interface NotifyMessageSendApi { | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 发送单条站内信给 Admin 用户 | |
| 16 | + * | |
| 17 | + * @param reqDTO 发送请求 | |
| 18 | + * @return 发送消息 ID | |
| 19 | + */ | |
| 20 | + Long sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 发送单条站内信给 Member 用户 | |
| 24 | + * | |
| 25 | + * @param reqDTO 发送请求 | |
| 26 | + * @return 发送消息 ID | |
| 27 | + */ | |
| 28 | + Long sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); | |
| 29 | + | |
| 30 | +} | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.notify.dto; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import javax.validation.constraints.NotEmpty; | |
| 6 | +import javax.validation.constraints.NotNull; | |
| 7 | +import java.util.Map; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 站内信发送给 Admin 或者 Member 用户 | |
| 11 | + * | |
| 12 | + * @author xrcoder | |
| 13 | + */ | |
| 14 | +@Data | |
| 15 | +public class NotifySendSingleToUserReqDTO { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 用户编号 | |
| 19 | + */ | |
| 20 | + @NotNull(message = "用户编号不能为空") | |
| 21 | + private Long userId; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 站内信模板编号 | |
| 25 | + */ | |
| 26 | + @NotEmpty(message = "站内信模板编号不能为空") | |
| 27 | + private String templateCode; | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 站内信模板参数 | |
| 31 | + */ | |
| 32 | + private Map<String, Object> templateParams; | |
| 33 | +} | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java
| ... | ... | @@ -141,4 +141,25 @@ public interface ErrorCodeConstants { |
| 141 | 141 | ErrorCode OAUTH2_CODE_NOT_EXISTS = new ErrorCode(1002022000, "code 不存在"); |
| 142 | 142 | ErrorCode OAUTH2_CODE_EXPIRE = new ErrorCode(1002022001, "code 已过期"); |
| 143 | 143 | |
| 144 | + // ========== 邮箱账号 1002023000 ========== | |
| 145 | + ErrorCode MAIL_ACCOUNT_NOT_EXISTS = new ErrorCode(1002023000, "邮箱账号不存在"); | |
| 146 | + ErrorCode MAIL_ACCOUNT_RELATE_TEMPLATE_EXISTS = new ErrorCode(1002023001, "无法删除,该邮箱账号还有邮件模板"); | |
| 147 | + | |
| 148 | + // ========== 邮件模版 1002024000 ========== | |
| 149 | + ErrorCode MAIL_TEMPLATE_NOT_EXISTS = new ErrorCode(1002024000, "邮件模版不存在"); | |
| 150 | + ErrorCode MAIL_TEMPLATE_CODE_EXISTS = new ErrorCode(1002024001, "邮件模版 code({}) 已存在"); | |
| 151 | + | |
| 152 | + // ========== 邮件发送 1002025000 ========== | |
| 153 | + ErrorCode MAIL_SEND_TEMPLATE_PARAM_MISS = new ErrorCode(1002025000, "模板参数({})缺失"); | |
| 154 | + ErrorCode MAIL_SEND_MAIL_NOT_EXISTS = new ErrorCode(1002025000, "邮箱不存在"); | |
| 155 | + | |
| 156 | + // ========== 站内信模版 1002026000 ========== | |
| 157 | + ErrorCode NOTIFY_TEMPLATE_NOT_EXISTS = new ErrorCode(1002026000, "站内信模版不存在"); | |
| 158 | + ErrorCode NOTIFY_TEMPLATE_CODE_DUPLICATE = new ErrorCode(1002026001, "已经存在编码为【{}】的站内信模板"); | |
| 159 | + | |
| 160 | + // ========== 站内信模版 1002027000 ========== | |
| 161 | + | |
| 162 | + // ========== 站内信发送 1002028000 ========== | |
| 163 | + ErrorCode NOTIFY_SEND_TEMPLATE_PARAM_MISS = new ErrorCode(1002025000, "模板参数({})缺失"); | |
| 164 | + | |
| 144 | 165 | } | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/mail/MailSendStatusEnum.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.enums.mail; | |
| 2 | + | |
| 3 | +import lombok.AllArgsConstructor; | |
| 4 | +import lombok.Getter; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * 邮件的发送状态枚举 | |
| 8 | + * | |
| 9 | + * @author wangjingyi | |
| 10 | + * @since 2022/4/10 13:39 | |
| 11 | + */ | |
| 12 | +@Getter | |
| 13 | +@AllArgsConstructor | |
| 14 | +public enum MailSendStatusEnum { | |
| 15 | + | |
| 16 | + INIT(0), // 初始化 | |
| 17 | + SUCCESS(10), // 发送成功 | |
| 18 | + FAILURE(20), // 发送失败 | |
| 19 | + IGNORE(30), // 忽略,即不发送 | |
| 20 | + ; | |
| 21 | + | |
| 22 | + private final int status; | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/pom.xml
| ... | ... | @@ -106,6 +106,10 @@ |
| 106 | 106 | <artifactId>yudao-spring-boot-starter-captcha</artifactId> |
| 107 | 107 | </dependency> |
| 108 | 108 | |
| 109 | + <dependency> | |
| 110 | + <groupId>org.springframework.boot</groupId> | |
| 111 | + <artifactId>spring-boot-starter-mail</artifactId> | |
| 112 | + </dependency> | |
| 109 | 113 | </dependencies> |
| 110 | 114 | |
| 111 | 115 | </project> | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApiImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.api.mail.dto.MailSendSingleToUserReqDTO; | |
| 4 | +import cn.iocoder.yudao.module.system.service.mail.MailSendService; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | + | |
| 8 | +import javax.annotation.Resource; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 邮件发送 API 实现类 | |
| 12 | + * | |
| 13 | + * @author wangjingyi | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +@Validated | |
| 17 | +public class MailSendApiImpl implements MailSendApi { | |
| 18 | + | |
| 19 | + @Resource | |
| 20 | + private MailSendService mailSendService; | |
| 21 | + | |
| 22 | + @Override | |
| 23 | + public Long sendSingleMailToAdmin(MailSendSingleToUserReqDTO reqDTO) { | |
| 24 | + return mailSendService.sendSingleMailToAdmin(reqDTO.getMail(), reqDTO.getUserId(), | |
| 25 | + reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public Long sendSingleMailToMember(MailSendSingleToUserReqDTO reqDTO) { | |
| 30 | + return mailSendService.sendSingleMailToMember(reqDTO.getMail(), reqDTO.getUserId(), | |
| 31 | + reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | |
| 32 | + } | |
| 33 | + | |
| 34 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApiImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.api.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; | |
| 4 | +import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; | |
| 5 | +import cn.iocoder.yudao.module.system.service.notify.NotifySendService; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | + | |
| 8 | +import javax.annotation.Resource; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 站内信发送 API 实现类 | |
| 12 | + * | |
| 13 | + * @author xrcoder | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +public class NotifyMessageSendApiImpl implements NotifyMessageSendApi { | |
| 17 | + | |
| 18 | + @Resource | |
| 19 | + private NotifySendService notifySendService; | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) { | |
| 23 | + return notifySendService.sendSingleNotifyToAdmin(reqDTO.getUserId(), | |
| 24 | + reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) { | |
| 29 | + return notifySendService.sendSingleNotifyToMember(reqDTO.getUserId(), | |
| 30 | + reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | |
| 31 | + } | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | + | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.*; | |
| 7 | +import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 9 | +import cn.iocoder.yudao.module.system.service.mail.MailAccountService; | |
| 10 | +import io.swagger.annotations.Api; | |
| 11 | +import io.swagger.annotations.ApiImplicitParam; | |
| 12 | +import io.swagger.annotations.ApiOperation; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.web.bind.annotation.*; | |
| 15 | + | |
| 16 | +import javax.annotation.Resource; | |
| 17 | +import javax.validation.Valid; | |
| 18 | +import java.util.Comparator; | |
| 19 | +import java.util.List; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +@Api(tags = "管理后台 - 邮箱账号") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/system/mail-account") | |
| 26 | +public class MailAccountController { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private MailAccountService mailAccountService; | |
| 30 | + | |
| 31 | + @PostMapping("/create") | |
| 32 | + @ApiOperation("创建邮箱账号") | |
| 33 | + @PreAuthorize("@ss.hasPermission('system:mail-account:create')") | |
| 34 | + public CommonResult<Long> createMailAccount(@Valid @RequestBody MailAccountCreateReqVO createReqVO) { | |
| 35 | + return success(mailAccountService.createMailAccount(createReqVO)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @PutMapping("/update") | |
| 39 | + @ApiOperation("修改邮箱账号") | |
| 40 | + @PreAuthorize("@ss.hasPermission('system:mail-account:update')") | |
| 41 | + public CommonResult<Boolean> updateMailAccount(@Valid @RequestBody MailAccountUpdateReqVO updateReqVO) { | |
| 42 | + mailAccountService.updateMailAccount(updateReqVO); | |
| 43 | + return success(true); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @DeleteMapping("/delete") | |
| 47 | + @ApiOperation("删除邮箱账号") | |
| 48 | + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | |
| 49 | + @PreAuthorize("@ss.hasPermission('system:mail-account:delete')") | |
| 50 | + public CommonResult<Boolean> deleteMailAccount(@RequestParam Long id) { | |
| 51 | + mailAccountService.deleteMailAccount(id); | |
| 52 | + return success(true); | |
| 53 | + } | |
| 54 | + | |
| 55 | + @GetMapping("/get") | |
| 56 | + @ApiOperation("获得邮箱账号") | |
| 57 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 58 | + @PreAuthorize("@ss.hasPermission('system:mail-account:get')") | |
| 59 | + public CommonResult<MailAccountRespVO> getMailAccount(@RequestParam("id") Long id) { | |
| 60 | + MailAccountDO mailAccountDO = mailAccountService.getMailAccount(id); | |
| 61 | + return success(MailAccountConvert.INSTANCE.convert(mailAccountDO)); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @GetMapping("/page") | |
| 65 | + @ApiOperation("获得邮箱账号分页") | |
| 66 | + @PreAuthorize("@ss.hasPermission('system:mail-account:query')") | |
| 67 | + public CommonResult<PageResult<MailAccountBaseVO>> getMailAccountPage(@Valid MailAccountPageReqVO pageReqVO) { | |
| 68 | + PageResult<MailAccountDO> pageResult = mailAccountService.getMailAccountPage(pageReqVO); | |
| 69 | + return success(MailAccountConvert.INSTANCE.convertPage(pageResult)); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @GetMapping("/list-all-simple") | |
| 73 | + @ApiOperation(value = "获得邮箱账号精简列表") | |
| 74 | + public CommonResult<List<MailAccountSimpleRespVO>> getSimpleMailAccountList() { | |
| 75 | + List<MailAccountDO> list = mailAccountService.getMailAccountList(); | |
| 76 | + return success(MailAccountConvert.INSTANCE.convertList02(list)); | |
| 77 | + } | |
| 78 | + | |
| 79 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | + | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateRespVO; | |
| 9 | +import cn.iocoder.yudao.module.system.convert.mail.MailLogConvert; | |
| 10 | +import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 12 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 13 | +import cn.iocoder.yudao.module.system.service.mail.MailLogService; | |
| 14 | +import io.swagger.annotations.Api; | |
| 15 | +import io.swagger.annotations.ApiImplicitParam; | |
| 16 | +import io.swagger.annotations.ApiOperation; | |
| 17 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 18 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 19 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 20 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 21 | +import org.springframework.web.bind.annotation.RestController; | |
| 22 | + | |
| 23 | +import javax.annotation.Resource; | |
| 24 | +import javax.validation.Valid; | |
| 25 | + | |
| 26 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 27 | + | |
| 28 | + | |
| 29 | +@Api(tags = "管理后台 - 邮件日志") | |
| 30 | +@RestController | |
| 31 | +@RequestMapping("/system/mail-log") | |
| 32 | +public class MailLogController { | |
| 33 | + | |
| 34 | + @Resource | |
| 35 | + private MailLogService mailLogService; | |
| 36 | + | |
| 37 | + @GetMapping("/page") | |
| 38 | + @ApiOperation("获得邮箱日志分页") | |
| 39 | + @PreAuthorize("@ss.hasPermission('system:mail-log:query')") | |
| 40 | + public CommonResult<PageResult<MailLogRespVO>> getMailLogPage(@Valid MailLogPageReqVO pageVO) { | |
| 41 | + PageResult<MailLogDO> pageResult = mailLogService.getMailLogPage(pageVO); | |
| 42 | + return success(MailLogConvert.INSTANCE.convertPage(pageResult)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @GetMapping("/get") | |
| 46 | + @ApiOperation("获得邮箱日志") | |
| 47 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 48 | + @PreAuthorize("@ss.hasPermission('system:mail-log:query')") | |
| 49 | + public CommonResult<MailLogRespVO> getMailTemplate(@RequestParam("id") Long id) { | |
| 50 | + MailLogDO mailLogDO = mailLogService.getMailLog(id); | |
| 51 | + return success(MailLogConvert.INSTANCE.convert(mailLogDO)); | |
| 52 | + } | |
| 53 | + | |
| 54 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.http
0 → 100644
| 1 | +### 请求 /system/mail-template/send-mail 接口 => 成功 | |
| 2 | +POST {{baseUrl}}/system/mail-template/send-mail | |
| 3 | +Authorization: Bearer {{token}} | |
| 4 | +Content-Type: application/json | |
| 5 | +tenant-id: {{adminTenentId}} | |
| 6 | + | |
| 7 | +{ | |
| 8 | + "templateCode": "test_01", | |
| 9 | + "mail": "7685413@qq.com", | |
| 10 | + "templateParams": { | |
| 11 | + "key01": "value01", | |
| 12 | + "key02": "value02" | |
| 13 | + } | |
| 14 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateSendReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 9 | +import cn.iocoder.yudao.module.system.service.mail.MailSendService; | |
| 10 | +import cn.iocoder.yudao.module.system.service.mail.MailTemplateService; | |
| 11 | +import io.swagger.annotations.Api; | |
| 12 | +import io.swagger.annotations.ApiImplicitParam; | |
| 13 | +import io.swagger.annotations.ApiOperation; | |
| 14 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 15 | +import org.springframework.web.bind.annotation.*; | |
| 16 | + | |
| 17 | +import javax.annotation.Resource; | |
| 18 | +import javax.validation.Valid; | |
| 19 | +import java.util.List; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +@Api(tags = "管理后台 - 邮件模版") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/system/mail-template") | |
| 26 | +public class MailTemplateController { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private MailTemplateService mailTempleService; | |
| 30 | + @Resource | |
| 31 | + private MailSendService mailSendService; | |
| 32 | + | |
| 33 | + @PostMapping("/create") | |
| 34 | + @ApiOperation("创建邮件模版") | |
| 35 | + @PreAuthorize("@ss.hasPermission('system:mail-template:create')") | |
| 36 | + public CommonResult<Long> createMailTemplate(@Valid @RequestBody MailTemplateCreateReqVO createReqVO){ | |
| 37 | + return success(mailTempleService.createMailTemplate(createReqVO)); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @PutMapping("/update") | |
| 41 | + @ApiOperation("修改邮件模版") | |
| 42 | + @PreAuthorize("@ss.hasPermission('system:mail-template:update')") | |
| 43 | + public CommonResult<Boolean> updateMailTemplate(@Valid @RequestBody MailTemplateUpdateReqVO updateReqVO){ | |
| 44 | + mailTempleService.updateMailTemplate(updateReqVO); | |
| 45 | + return success(true); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @DeleteMapping("/delete") | |
| 49 | + @ApiOperation("删除邮件模版") | |
| 50 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 51 | + @PreAuthorize("@ss.hasPermission('system:mail-template:delete')") | |
| 52 | + public CommonResult<Boolean> deleteMailTemplate(@RequestParam("id") Long id) { | |
| 53 | + mailTempleService.deleteMailTemplate(id); | |
| 54 | + return success(true); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @GetMapping("/get") | |
| 58 | + @ApiOperation("获得邮件模版") | |
| 59 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 60 | + @PreAuthorize("@ss.hasPermission('system:mail-template:get')") | |
| 61 | + public CommonResult<MailTemplateRespVO> getMailTemplate(@RequestParam("id") Long id) { | |
| 62 | + MailTemplateDO mailTemplateDO = mailTempleService.getMailTemplate(id); | |
| 63 | + return success(MailTemplateConvert.INSTANCE.convert(mailTemplateDO)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @GetMapping("/page") | |
| 67 | + @ApiOperation("获得邮件模版分页") | |
| 68 | + @PreAuthorize("@ss.hasPermission('system:mail-template:query')") | |
| 69 | + public CommonResult<PageResult<MailTemplateRespVO>> getMailTemplatePage(@Valid MailTemplatePageReqVO pageReqVO) { | |
| 70 | + PageResult<MailTemplateDO> pageResult = mailTempleService.getMailTemplatePage(pageReqVO); | |
| 71 | + return success(MailTemplateConvert.INSTANCE.convertPage(pageResult)); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/list-all-simple") | |
| 75 | + @ApiOperation(value = "获得邮件模版精简列表") | |
| 76 | + public CommonResult<List<MailTemplateSimpleRespVO>> getSimpleTemplateList() { | |
| 77 | + List<MailTemplateDO> list = mailTempleService.getMailTemplateList(); | |
| 78 | + return success(MailTemplateConvert.INSTANCE.convertList02(list)); | |
| 79 | + } | |
| 80 | + | |
| 81 | + @PostMapping("/send-mail") | |
| 82 | + @ApiOperation("发送短信") | |
| 83 | + @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')") | |
| 84 | + public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) { | |
| 85 | + return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null, | |
| 86 | + sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); | |
| 87 | + } | |
| 88 | + | |
| 89 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModelProperty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import javax.validation.constraints.Email; | |
| 7 | +import javax.validation.constraints.NotNull; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 邮箱账号 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 11 | + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 12 | + */ | |
| 13 | +@Data | |
| 14 | +public class MailAccountBaseVO { | |
| 15 | + | |
| 16 | + @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com") | |
| 17 | + @NotNull(message = "邮箱不能为空") | |
| 18 | + @Email(message = "必须是 Email 格式") | |
| 19 | + private String mail; | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "用户名", required = true, example = "yudao") | |
| 22 | + @NotNull(message = "用户名不能为空") | |
| 23 | + private String username; | |
| 24 | + | |
| 25 | + @ApiModelProperty(value = "密码", required = true, example = "123456") | |
| 26 | + @NotNull(message = "密码必填") | |
| 27 | + private String password; | |
| 28 | + | |
| 29 | + @ApiModelProperty(value = "SMTP 服务器域名", required = true, example = "www.iocoder.cn") | |
| 30 | + @NotNull(message = "SMTP 服务器域名不能为空") | |
| 31 | + private String host; | |
| 32 | + | |
| 33 | + @ApiModelProperty(value = "SMTP 服务器端口", required = true, example = "80") | |
| 34 | + @NotNull(message = "SMTP 服务器端口不能为空") | |
| 35 | + private Integer port; | |
| 36 | + | |
| 37 | + @ApiModelProperty(value = "是否开启 ssl", required = true, example = "true") | |
| 38 | + @NotNull(message = "是否开启 ssl 必填") | |
| 39 | + private Boolean sslEnable; | |
| 40 | + | |
| 41 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | + | |
| 11 | +@ApiModel("管理后台 - 邮箱账号创建 Request VO") | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +@ToString(callSuper = true) | |
| 15 | +public class MailAccountCreateReqVO extends MailAccountBaseVO { | |
| 16 | + | |
| 17 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 9 | + | |
| 10 | +@ApiModel("管理后台 - 邮箱账号分页 Request VO") | |
| 11 | +@Data | |
| 12 | +@EqualsAndHashCode(callSuper = true) | |
| 13 | +@ToString(callSuper = true) | |
| 14 | +public class MailAccountPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com") | |
| 17 | + private String mail; | |
| 18 | + | |
| 19 | + @ApiModelProperty(value = "用户名" , required = true , example = "yudao") | |
| 20 | + private String username; | |
| 21 | + | |
| 22 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | + | |
| 12 | +@ApiModel("管理后台 - 邮箱账号 Response VO") | |
| 13 | +@Data | |
| 14 | +@EqualsAndHashCode(callSuper = true) | |
| 15 | +@ToString(callSuper = true) | |
| 16 | +public class MailAccountRespVO extends MailAccountBaseVO { | |
| 17 | + | |
| 18 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 19 | + @NotNull(message = "编号不能为空") | |
| 20 | + private Long id; | |
| 21 | + | |
| 22 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 23 | + private LocalDateTime createTime; | |
| 24 | + | |
| 25 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 邮箱账号的精简 Response VO") | |
| 8 | +@Data | |
| 9 | +public class MailAccountSimpleRespVO { | |
| 10 | + | |
| 11 | + @ApiModelProperty(value = "邮箱编号", required = true, example = "1024") | |
| 12 | + private Long id; | |
| 13 | + | |
| 14 | + @ApiModelProperty(value = "邮箱", required = true, example = "768541388@qq.com") | |
| 15 | + private String mail; | |
| 16 | + | |
| 17 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | + | |
| 11 | +@ApiModel("管理后台 - 邮箱账号修改 Request VO") | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +@ToString(callSuper = true) | |
| 15 | +public class MailAccountUpdateReqVO extends MailAccountBaseVO { | |
| 16 | + | |
| 17 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 18 | + @NotNull(message = "编号不能为空") | |
| 19 | + private Long id; | |
| 20 | + | |
| 21 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import io.swagger.annotations.*; | |
| 9 | +import javax.validation.constraints.*; | |
| 10 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 11 | + | |
| 12 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | + | |
| 14 | +/** | |
| 15 | +* 邮件日志 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 16 | +* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 17 | +*/ | |
| 18 | +@Data | |
| 19 | +public class MailLogBaseVO { | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "用户编号", example = "30883") | |
| 22 | + private Long userId; | |
| 23 | + | |
| 24 | + @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") | |
| 25 | + private Byte userType; | |
| 26 | + | |
| 27 | + @ApiModelProperty(value = "接收邮箱地址", required = true, example = "76854@qq.com") | |
| 28 | + @NotNull(message = "接收邮箱地址不能为空") | |
| 29 | + private String toMail; | |
| 30 | + | |
| 31 | + @ApiModelProperty(value = "邮箱账号编号", required = true, example = "18107") | |
| 32 | + @NotNull(message = "邮箱账号编号不能为空") | |
| 33 | + private Long accountId; | |
| 34 | + | |
| 35 | + @ApiModelProperty(value = "发送邮箱地址", required = true, example = "85757@qq.com") | |
| 36 | + @NotNull(message = "发送邮箱地址不能为空") | |
| 37 | + private String fromMail; | |
| 38 | + | |
| 39 | + @ApiModelProperty(value = "模板编号", required = true, example = "5678") | |
| 40 | + @NotNull(message = "模板编号不能为空") | |
| 41 | + private Long templateId; | |
| 42 | + | |
| 43 | + @ApiModelProperty(value = "模板编码", required = true, example = "test_01") | |
| 44 | + @NotNull(message = "模板编码不能为空") | |
| 45 | + private String templateCode; | |
| 46 | + | |
| 47 | + @ApiModelProperty(value = "模版发送人名称", example = "李四") | |
| 48 | + private String templateNickname; | |
| 49 | + | |
| 50 | + @ApiModelProperty(value = "邮件标题", required = true, example = "测试标题") | |
| 51 | + @NotNull(message = "邮件标题不能为空") | |
| 52 | + private String templateTitle; | |
| 53 | + | |
| 54 | + @ApiModelProperty(value = "邮件内容", required = true, example = "测试内容") | |
| 55 | + @NotNull(message = "邮件内容不能为空") | |
| 56 | + private String templateContent; | |
| 57 | + | |
| 58 | + @ApiModelProperty(value = "邮件参数", required = true) | |
| 59 | + @NotNull(message = "邮件参数不能为空") | |
| 60 | + private Map<String, Object> templateParams; | |
| 61 | + | |
| 62 | + @ApiModelProperty(value = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举") | |
| 63 | + @NotNull(message = "发送状态不能为空") | |
| 64 | + private Byte sendStatus; | |
| 65 | + | |
| 66 | + @ApiModelProperty(value = "发送时间") | |
| 67 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 68 | + private LocalDateTime sendTime; | |
| 69 | + | |
| 70 | + @ApiModelProperty(value = "发送返回的消息 ID", example = "28568") | |
| 71 | + private String sendMessageId; | |
| 72 | + | |
| 73 | + @ApiModelProperty(value = "发送异常") | |
| 74 | + private String sendException; | |
| 75 | + | |
| 76 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 9 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 10 | + | |
| 11 | +import java.sql.Timestamp; | |
| 12 | +import java.time.LocalDateTime; | |
| 13 | + | |
| 14 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 15 | + | |
| 16 | +@ApiModel("管理后台 - 邮箱日志分页 Request VO") | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +public class MailLogPageReqVO extends PageParam { | |
| 21 | + | |
| 22 | + @ApiModelProperty(value = "用户编号", example = "30883") | |
| 23 | + private Long userId; | |
| 24 | + | |
| 25 | + @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") | |
| 26 | + private Integer userType; | |
| 27 | + | |
| 28 | + @ApiModelProperty(value = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配") | |
| 29 | + private String toMail; | |
| 30 | + | |
| 31 | + @ApiModelProperty(value = "邮箱账号编号", example = "18107") | |
| 32 | + private Long accountId; | |
| 33 | + | |
| 34 | + @ApiModelProperty(value = "模板编号", example = "5678") | |
| 35 | + private Long templateId; | |
| 36 | + | |
| 37 | + @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举") | |
| 38 | + private Integer sendStatus; | |
| 39 | + | |
| 40 | + @ApiModelProperty(value = "发送时间") | |
| 41 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 42 | + private LocalDateTime[] sendTime; | |
| 43 | + | |
| 44 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.time.LocalDateTime; | |
| 5 | +import io.swagger.annotations.*; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 邮件日志 Response VO") | |
| 8 | +@Data | |
| 9 | +@EqualsAndHashCode(callSuper = true) | |
| 10 | +@ToString(callSuper = true) | |
| 11 | +public class MailLogRespVO extends MailLogBaseVO { | |
| 12 | + | |
| 13 | + @ApiModelProperty(value = "编号", required = true, example = "31020") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 17 | + private LocalDateTime createTime; | |
| 18 | + | |
| 19 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import javax.validation.constraints.NotEmpty; | |
| 8 | +import javax.validation.constraints.NotNull; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 邮件模版 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 12 | + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 13 | + */ | |
| 14 | +@Data | |
| 15 | +public class MailTemplateBaseVO { | |
| 16 | + | |
| 17 | + @ApiModelProperty(value = "模版名称", required = true, example = "测试名字") | |
| 18 | + @NotNull(message = "名称不能为空") | |
| 19 | + private String name; | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "模版编号", required = true, example = "test") | |
| 22 | + @NotNull(message = "模版编号不能为空") | |
| 23 | + private String code; | |
| 24 | + | |
| 25 | + @ApiModelProperty(value = "发送的邮箱账号编号", required = true, example = "1") | |
| 26 | + @NotNull(message = "发送的邮箱账号编号不能为空") | |
| 27 | + private Long accountId; | |
| 28 | + | |
| 29 | + @ApiModelProperty(value = "发送人名称", example = "芋头") | |
| 30 | + private String nickname; | |
| 31 | + | |
| 32 | + @ApiModelProperty(value = "标题", required = true, example = "注册成功") | |
| 33 | + @NotEmpty(message = "标题不能为空") | |
| 34 | + private String title; | |
| 35 | + | |
| 36 | + @ApiModelProperty(value = "内容", required = true, example = "你好,注册成功啦") | |
| 37 | + @NotEmpty(message = "内容不能为空") | |
| 38 | + private String content; | |
| 39 | + | |
| 40 | + @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 41 | + @NotNull(message = "状态不能为空") | |
| 42 | + private Integer status; | |
| 43 | + | |
| 44 | + @ApiModelProperty(value = "备注", example = "奥特曼") | |
| 45 | + private String remark; | |
| 46 | + | |
| 47 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import lombok.Data; | |
| 5 | +import lombok.EqualsAndHashCode; | |
| 6 | +import lombok.ToString; | |
| 7 | + | |
| 8 | +@ApiModel("管理后台 - 邮件模版创建 Request VO") | |
| 9 | +@Data | |
| 10 | +@EqualsAndHashCode(callSuper = true) | |
| 11 | +@ToString(callSuper = true) | |
| 12 | +public class MailTemplateCreateReqVO extends MailTemplateBaseVO { | |
| 13 | + | |
| 14 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 9 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 10 | + | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | + | |
| 13 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 14 | + | |
| 15 | +@ApiModel("管理后台 - 邮件模版分页 Request VO") | |
| 16 | +@Data | |
| 17 | +@EqualsAndHashCode(callSuper = true) | |
| 18 | +@ToString(callSuper = true) | |
| 19 | +public class MailTemplatePageReqVO extends PageParam { | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 22 | + private Integer status; | |
| 23 | + | |
| 24 | + @ApiModelProperty(value = "标识", example = "code_1024", notes = "模糊匹配") | |
| 25 | + private String code; | |
| 26 | + | |
| 27 | + @ApiModelProperty(value = "名称", example = "芋头", notes = "模糊匹配") | |
| 28 | + private String name; | |
| 29 | + | |
| 30 | + @ApiModelProperty(value = "账号编号", example = "2048") | |
| 31 | + private Long accountId; | |
| 32 | + | |
| 33 | + @ApiModelProperty(value = "创建时间") | |
| 34 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 35 | + private LocalDateTime[] createTime; | |
| 36 | + | |
| 37 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +@ApiModel("管理后台 - 邮件末班 Response VO") | |
| 13 | +@Data | |
| 14 | +@EqualsAndHashCode(callSuper = true) | |
| 15 | +@ToString(callSuper = true) | |
| 16 | +public class MailTemplateRespVO extends MailTemplateBaseVO { | |
| 17 | + | |
| 18 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 19 | + private Long id; | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "参数数组", example = "name,code") | |
| 22 | + private List<String> params; | |
| 23 | + | |
| 24 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 25 | + private LocalDateTime createTime; | |
| 26 | + | |
| 27 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import javax.validation.constraints.NotEmpty; | |
| 8 | +import javax.validation.constraints.NotNull; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +@ApiModel("管理后台 - 邮件发送 Req VO") | |
| 12 | +@Data | |
| 13 | +public class MailTemplateSendReqVO { | |
| 14 | + | |
| 15 | + @ApiModelProperty(value = "接收邮箱", required = true, example = "7685413@qq.com") | |
| 16 | + @NotEmpty(message = "接收邮箱不能为空") | |
| 17 | + private String mail; | |
| 18 | + | |
| 19 | + @ApiModelProperty(value = "模板编码", required = true, example = "test_01") | |
| 20 | + @NotNull(message = "模板编码不能为空") | |
| 21 | + private String templateCode; | |
| 22 | + | |
| 23 | + @ApiModelProperty(value = "模板参数") | |
| 24 | + private Map<String, Object> templateParams; | |
| 25 | + | |
| 26 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 邮件模版的精简 Response VO") | |
| 8 | +@Data | |
| 9 | +public class MailTemplateSimpleRespVO { | |
| 10 | + | |
| 11 | + @ApiModelProperty(value = "模版编号", required = true, example = "1024") | |
| 12 | + private Long id; | |
| 13 | + | |
| 14 | + @ApiModelProperty(value = "模版名字", required = true, example = "哒哒哒") | |
| 15 | + private String name; | |
| 16 | + | |
| 17 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | + | |
| 11 | +@ApiModel("管理后台 - 邮件模版修改 Request VO") | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +@ToString(callSuper = true) | |
| 15 | +public class MailTemplateUpdateReqVO extends MailTemplateBaseVO { | |
| 16 | + | |
| 17 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 18 | + @NotNull(message = "编号不能为空") | |
| 19 | + private Long id; | |
| 20 | + | |
| 21 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageMyPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessagePageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO; | |
| 9 | +import cn.iocoder.yudao.module.system.convert.notify.NotifyMessageConvert; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | |
| 11 | +import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; | |
| 12 | +import io.swagger.annotations.Api; | |
| 13 | +import io.swagger.annotations.ApiImplicitParam; | |
| 14 | +import io.swagger.annotations.ApiOperation; | |
| 15 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 16 | +import org.springframework.validation.annotation.Validated; | |
| 17 | +import org.springframework.web.bind.annotation.*; | |
| 18 | + | |
| 19 | +import javax.annotation.Resource; | |
| 20 | +import javax.validation.Valid; | |
| 21 | +import java.util.List; | |
| 22 | + | |
| 23 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 24 | +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | |
| 25 | + | |
| 26 | +@Api(tags = "管理后台 - 我的站内信") | |
| 27 | +@RestController | |
| 28 | +@RequestMapping("/system/notify-message") | |
| 29 | +@Validated | |
| 30 | +public class NotifyMessageController { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private NotifyMessageService notifyMessageService; | |
| 34 | + | |
| 35 | + // ========== 管理所有的站内信 ========== | |
| 36 | + | |
| 37 | + @GetMapping("/get") | |
| 38 | + @ApiOperation("获得站内信") | |
| 39 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 40 | + @PreAuthorize("@ss.hasPermission('system:notify-message:query')") | |
| 41 | + public CommonResult<NotifyMessageRespVO> getNotifyMessage(@RequestParam("id") Long id) { | |
| 42 | + NotifyMessageDO notifyMessage = notifyMessageService.getNotifyMessage(id); | |
| 43 | + return success(NotifyMessageConvert.INSTANCE.convert(notifyMessage)); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @GetMapping("/page") | |
| 47 | + @ApiOperation("获得站内信分页") | |
| 48 | + @PreAuthorize("@ss.hasPermission('system:notify-message:query')") | |
| 49 | + public CommonResult<PageResult<NotifyMessageRespVO>> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) { | |
| 50 | + PageResult<NotifyMessageDO> pageResult = notifyMessageService.getNotifyMessagePage(pageVO); | |
| 51 | + return success(NotifyMessageConvert.INSTANCE.convertPage(pageResult)); | |
| 52 | + } | |
| 53 | + | |
| 54 | + // ========== 查看自己的站内信 ========== | |
| 55 | + | |
| 56 | + @GetMapping("/my-page") | |
| 57 | + @ApiOperation("获得我的站内信分页") | |
| 58 | + public CommonResult<PageResult<NotifyMessageRespVO>> getMyMyNotifyMessagePage(@Valid NotifyMessageMyPageReqVO pageVO) { | |
| 59 | + PageResult<NotifyMessageDO> pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO, | |
| 60 | + getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | |
| 61 | + return success(NotifyMessageConvert.INSTANCE.convertPage(pageResult)); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @PutMapping("/update-read") | |
| 65 | + @ApiOperation("标记站内信为已读") | |
| 66 | + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) | |
| 67 | + public CommonResult<Boolean> updateNotifyMessageRead(@RequestParam("ids") List<Long> ids) { | |
| 68 | + notifyMessageService.updateNotifyMessageRead(ids, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | |
| 69 | + return success(Boolean.TRUE); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @PutMapping("/update-all-read") | |
| 73 | + @ApiOperation("标记所有站内信为已读") | |
| 74 | + public CommonResult<Boolean> updateAllNotifyMessageRead() { | |
| 75 | + notifyMessageService.updateAllNotifyMessageRead(getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | |
| 76 | + return success(Boolean.TRUE); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @GetMapping("/get-unread-list") | |
| 80 | + @ApiOperation("获取当前用户的最新站内信列表,默认 10 条") | |
| 81 | + @ApiImplicitParam(name = "size", value = "10", defaultValue = "10", dataTypeClass = Integer.class) | |
| 82 | + public CommonResult<List<NotifyMessageRespVO>> getUnreadNotifyMessageList( | |
| 83 | + @RequestParam(name = "size", defaultValue = "10") Integer size) { | |
| 84 | + List<NotifyMessageDO> list = notifyMessageService.getUnreadNotifyMessageList( | |
| 85 | + getLoginUserId(), UserTypeEnum.ADMIN.getValue(), size); | |
| 86 | + return success(NotifyMessageConvert.INSTANCE.convertList(list)); | |
| 87 | + } | |
| 88 | + | |
| 89 | + @GetMapping("/get-unread-count") | |
| 90 | + @ApiOperation("获得当前用户的未读站内信数量") | |
| 91 | + public CommonResult<Long> getUnreadNotifyMessageCount() { | |
| 92 | + return success(notifyMessageService.getUnreadNotifyMessageCount(getLoginUserId(), UserTypeEnum.ADMIN.getValue())); | |
| 93 | + } | |
| 94 | + | |
| 95 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*; | |
| 6 | +import cn.iocoder.yudao.module.system.convert.notify.NotifyTemplateConvert; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 8 | +import cn.iocoder.yudao.module.system.service.notify.NotifySendService; | |
| 9 | +import cn.iocoder.yudao.module.system.service.notify.NotifyTemplateService; | |
| 10 | +import io.swagger.annotations.Api; | |
| 11 | +import io.swagger.annotations.ApiImplicitParam; | |
| 12 | +import io.swagger.annotations.ApiOperation; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | +import org.springframework.web.bind.annotation.*; | |
| 16 | + | |
| 17 | +import javax.annotation.Resource; | |
| 18 | +import javax.validation.Valid; | |
| 19 | + | |
| 20 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 21 | + | |
| 22 | +@Api(tags = "管理后台 - 站内信模版") | |
| 23 | +@RestController | |
| 24 | +@RequestMapping("/system/notify-template") | |
| 25 | +@Validated | |
| 26 | +public class NotifyTemplateController { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private NotifyTemplateService notifyTemplateService; | |
| 30 | + | |
| 31 | + @Resource | |
| 32 | + private NotifySendService notifySendService; | |
| 33 | + | |
| 34 | + @PostMapping("/create") | |
| 35 | + @ApiOperation("创建站内信模版") | |
| 36 | + @PreAuthorize("@ss.hasPermission('system:notify-template:create')") | |
| 37 | + public CommonResult<Long> createNotifyTemplate(@Valid @RequestBody NotifyTemplateCreateReqVO createReqVO) { | |
| 38 | + return success(notifyTemplateService.createNotifyTemplate(createReqVO)); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @PutMapping("/update") | |
| 42 | + @ApiOperation("更新站内信模版") | |
| 43 | + @PreAuthorize("@ss.hasPermission('system:notify-template:update')") | |
| 44 | + public CommonResult<Boolean> updateNotifyTemplate(@Valid @RequestBody NotifyTemplateUpdateReqVO updateReqVO) { | |
| 45 | + notifyTemplateService.updateNotifyTemplate(updateReqVO); | |
| 46 | + return success(true); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @DeleteMapping("/delete") | |
| 50 | + @ApiOperation("删除站内信模版") | |
| 51 | + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | |
| 52 | + @PreAuthorize("@ss.hasPermission('system:notify-template:delete')") | |
| 53 | + public CommonResult<Boolean> deleteNotifyTemplate(@RequestParam("id") Long id) { | |
| 54 | + notifyTemplateService.deleteNotifyTemplate(id); | |
| 55 | + return success(true); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @GetMapping("/get") | |
| 59 | + @ApiOperation("获得站内信模版") | |
| 60 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 61 | + @PreAuthorize("@ss.hasPermission('system:notify-template:query')") | |
| 62 | + public CommonResult<NotifyTemplateRespVO> getNotifyTemplate(@RequestParam("id") Long id) { | |
| 63 | + NotifyTemplateDO notifyTemplate = notifyTemplateService.getNotifyTemplate(id); | |
| 64 | + return success(NotifyTemplateConvert.INSTANCE.convert(notifyTemplate)); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @GetMapping("/page") | |
| 68 | + @ApiOperation("获得站内信模版分页") | |
| 69 | + @PreAuthorize("@ss.hasPermission('system:notify-template:query')") | |
| 70 | + public CommonResult<PageResult<NotifyTemplateRespVO>> getNotifyTemplatePage(@Valid NotifyTemplatePageReqVO pageVO) { | |
| 71 | + PageResult<NotifyTemplateDO> pageResult = notifyTemplateService.getNotifyTemplatePage(pageVO); | |
| 72 | + return success(NotifyTemplateConvert.INSTANCE.convertPage(pageResult)); | |
| 73 | + } | |
| 74 | + | |
| 75 | + @PostMapping("/send-notify") | |
| 76 | + @ApiOperation("发送站内信") | |
| 77 | + @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") | |
| 78 | + public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { | |
| 79 | + return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), | |
| 80 | + sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); | |
| 81 | + } | |
| 82 | + | |
| 83 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModelProperty; | |
| 4 | +import lombok.Data; | |
| 5 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 6 | + | |
| 7 | +import javax.validation.constraints.NotNull; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import java.util.Date; | |
| 10 | +import java.util.Map; | |
| 11 | + | |
| 12 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 站内信消息 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 16 | + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 17 | + */ | |
| 18 | +@Data | |
| 19 | +public class NotifyMessageBaseVO { | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "用户编号", required = true, example = "25025") | |
| 22 | + @NotNull(message = "用户编号不能为空") | |
| 23 | + private Long userId; | |
| 24 | + | |
| 25 | + @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") | |
| 26 | + @NotNull(message = "用户类型不能为空") | |
| 27 | + private Byte userType; | |
| 28 | + | |
| 29 | + @ApiModelProperty(value = "模版编号", required = true, example = "13013") | |
| 30 | + @NotNull(message = "模版编号不能为空") | |
| 31 | + private Long templateId; | |
| 32 | + | |
| 33 | + @ApiModelProperty(value = "模板编码", required = true, example = "test_01") | |
| 34 | + @NotNull(message = "模板编码不能为空") | |
| 35 | + private String templateCode; | |
| 36 | + | |
| 37 | + @ApiModelProperty(value = "模版发送人名称", required = true, example = "芋艿") | |
| 38 | + @NotNull(message = "模版发送人名称不能为空") | |
| 39 | + private String templateNickname; | |
| 40 | + | |
| 41 | + @ApiModelProperty(value = "模版内容", required = true, example = "测试内容") | |
| 42 | + @NotNull(message = "模版内容不能为空") | |
| 43 | + private String templateContent; | |
| 44 | + | |
| 45 | + @ApiModelProperty(value = "模版类型", required = true, example = "2") | |
| 46 | + @NotNull(message = "模版类型不能为空") | |
| 47 | + private Integer templateType; | |
| 48 | + | |
| 49 | + @ApiModelProperty(value = "模版参数", required = true) | |
| 50 | + @NotNull(message = "模版参数不能为空") | |
| 51 | + private Map<String, Object> templateParams; | |
| 52 | + | |
| 53 | + @ApiModelProperty(value = "是否已读", required = true, example = "true") | |
| 54 | + @NotNull(message = "是否已读不能为空") | |
| 55 | + private Boolean readStatus; | |
| 56 | + | |
| 57 | + @ApiModelProperty(value = "阅读时间") | |
| 58 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 59 | + private LocalDateTime readTime; | |
| 60 | + | |
| 61 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 9 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 10 | + | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | + | |
| 13 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 14 | + | |
| 15 | +@ApiModel("管理后台 - 站内信分页 Request VO") | |
| 16 | +@Data | |
| 17 | +@EqualsAndHashCode(callSuper = true) | |
| 18 | +@ToString(callSuper = true) | |
| 19 | +public class NotifyMessageMyPageReqVO extends PageParam { | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "是否已读", example = "true") | |
| 22 | + private Boolean readStatus; | |
| 23 | + | |
| 24 | + @ApiModelProperty(value = "创建时间") | |
| 25 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 26 | + private LocalDateTime[] createTime; | |
| 27 | + | |
| 28 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 9 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 10 | + | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | +import java.util.Date; | |
| 13 | + | |
| 14 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 15 | + | |
| 16 | +@ApiModel("管理后台 - 站内信分页 Request VO") | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +public class NotifyMessagePageReqVO extends PageParam { | |
| 21 | + | |
| 22 | + @ApiModelProperty(value = "用户编号", example = "25025") | |
| 23 | + private Long userId; | |
| 24 | + | |
| 25 | + @ApiModelProperty(value = "用户类型", example = "1") | |
| 26 | + private Integer userType; | |
| 27 | + | |
| 28 | + @ApiModelProperty(value = "模板编码", example = "test_01") | |
| 29 | + private String templateCode; | |
| 30 | + | |
| 31 | + @ApiModelProperty(value = "模版类型", example = "2") | |
| 32 | + private Integer templateType; | |
| 33 | + | |
| 34 | + @ApiModelProperty(value = "创建时间") | |
| 35 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 36 | + private LocalDateTime[] createTime; | |
| 37 | + | |
| 38 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.annotations.*; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 站内信 Response VO") | |
| 8 | +@Data | |
| 9 | +@EqualsAndHashCode(callSuper = true) | |
| 10 | +@ToString(callSuper = true) | |
| 11 | +public class NotifyMessageRespVO extends NotifyMessageBaseVO { | |
| 12 | + | |
| 13 | + @ApiModelProperty(value = "ID", required = true, example = "1024") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 17 | + private Date createTime; | |
| 18 | + | |
| 19 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | +import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import javax.validation.constraints.NotEmpty; | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | + | |
| 11 | +/** | |
| 12 | +* 站内信模版 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 13 | +* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 14 | +*/ | |
| 15 | +@Data | |
| 16 | +public class NotifyTemplateBaseVO { | |
| 17 | + | |
| 18 | + @ApiModelProperty(value = "模版名称", required = true, example = "测试模版") | |
| 19 | + @NotEmpty(message = "模版名称不能为空") | |
| 20 | + private String name; | |
| 21 | + | |
| 22 | + @ApiModelProperty(value = "模版编码", required = true, example = "SEND_TEST") | |
| 23 | + @NotNull(message = "模版编码不能为空") | |
| 24 | + private String code; | |
| 25 | + | |
| 26 | + @ApiModelProperty(value = "模版类型", required = true, example = "1", notes = "对应 system_notify_template_type 字典") | |
| 27 | + @NotNull(message = "模版类型不能为空") | |
| 28 | + private Integer type; | |
| 29 | + | |
| 30 | + @ApiModelProperty(value = "发送人名称", required = true, example = "土豆") | |
| 31 | + @NotEmpty(message = "发送人名称不能为空") | |
| 32 | + private String nickname; | |
| 33 | + | |
| 34 | + @ApiModelProperty(value = "模版内容", required = true, example = "我是模版内容") | |
| 35 | + @NotEmpty(message = "模版内容不能为空") | |
| 36 | + private String content; | |
| 37 | + | |
| 38 | + @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 39 | + @NotNull(message = "状态不能为空") | |
| 40 | + @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") | |
| 41 | + private Integer status; | |
| 42 | + | |
| 43 | + @ApiModelProperty(value = "备注", example = "我是备注") | |
| 44 | + private String remark; | |
| 45 | + | |
| 46 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import io.swagger.annotations.*; | |
| 5 | + | |
| 6 | +@ApiModel("管理后台 - 站内信模版创建 Request VO") | |
| 7 | +@Data | |
| 8 | +@EqualsAndHashCode(callSuper = true) | |
| 9 | +@ToString(callSuper = true) | |
| 10 | +public class NotifyTemplateCreateReqVO extends NotifyTemplateBaseVO { | |
| 11 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | |
| 4 | +import lombok.*; | |
| 5 | + | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.util.*; | |
| 8 | +import io.swagger.annotations.*; | |
| 9 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 10 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 11 | + | |
| 12 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | + | |
| 14 | +@ApiModel("管理后台 - 站内信模版分页 Request VO") | |
| 15 | +@Data | |
| 16 | +@EqualsAndHashCode(callSuper = true) | |
| 17 | +@ToString(callSuper = true) | |
| 18 | +public class NotifyTemplatePageReqVO extends PageParam { | |
| 19 | + | |
| 20 | + @ApiModelProperty(value = "模版编码", example = "test_01") | |
| 21 | + private String code; | |
| 22 | + | |
| 23 | + @ApiModelProperty(value = "模版名称", example = "我是名称") | |
| 24 | + private String name; | |
| 25 | + | |
| 26 | + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") | |
| 27 | + private Integer status; | |
| 28 | + | |
| 29 | + @ApiModelProperty(value = "创建时间") | |
| 30 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 31 | + private LocalDateTime[] createTime; | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.annotations.*; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 站内信模版 Response VO") | |
| 8 | +@Data | |
| 9 | +@EqualsAndHashCode(callSuper = true) | |
| 10 | +@ToString(callSuper = true) | |
| 11 | +public class NotifyTemplateRespVO extends NotifyTemplateBaseVO { | |
| 12 | + | |
| 13 | + @ApiModelProperty(value = "ID", required = true, example = "1024") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @ApiModelProperty(value = "参数数组", example = "name,code") | |
| 17 | + private List<String> params; | |
| 18 | + | |
| 19 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 20 | + private Date createTime; | |
| 21 | + | |
| 22 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import javax.validation.constraints.NotEmpty; | |
| 8 | +import javax.validation.constraints.NotNull; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +@ApiModel("管理后台 - 站内信模板的发送 Request VO") | |
| 12 | +@Data | |
| 13 | +public class NotifyTemplateSendReqVO { | |
| 14 | + | |
| 15 | + @ApiModelProperty(value = "用户id", required = true, example = "01") | |
| 16 | + @NotNull(message = "用户id不能为空") | |
| 17 | + private Long userId; | |
| 18 | + | |
| 19 | + @ApiModelProperty(value = "模板编码", required = true, example = "01") | |
| 20 | + @NotEmpty(message = "模板编码不能为空") | |
| 21 | + private String templateCode; | |
| 22 | + | |
| 23 | + @ApiModelProperty(value = "模板参数") | |
| 24 | + private Map<String, Object> templateParams; | |
| 25 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import io.swagger.annotations.*; | |
| 5 | +import javax.validation.constraints.*; | |
| 6 | + | |
| 7 | +@ApiModel("管理后台 - 站内信模版更新 Request VO") | |
| 8 | +@Data | |
| 9 | +@EqualsAndHashCode(callSuper = true) | |
| 10 | +@ToString(callSuper = true) | |
| 11 | +public class NotifyTemplateUpdateReqVO extends NotifyTemplateBaseVO { | |
| 12 | + | |
| 13 | + @ApiModelProperty(value = "ID", required = true, example = "1024") | |
| 14 | + @NotNull(message = "ID 不能为空") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailAccountConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.mail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.StrUtil; | |
| 4 | +import cn.hutool.extra.mail.MailAccount; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.*; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 8 | +import org.mapstruct.Mapper; | |
| 9 | +import org.mapstruct.factory.Mappers; | |
| 10 | + | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +@Mapper | |
| 14 | +public interface MailAccountConvert { | |
| 15 | + | |
| 16 | + MailAccountConvert INSTANCE = Mappers.getMapper(MailAccountConvert.class); | |
| 17 | + | |
| 18 | + MailAccountDO convert(MailAccountCreateReqVO bean); | |
| 19 | + | |
| 20 | + MailAccountDO convert(MailAccountUpdateReqVO bean); | |
| 21 | + | |
| 22 | + MailAccountRespVO convert(MailAccountDO bean); | |
| 23 | + | |
| 24 | + PageResult<MailAccountBaseVO> convertPage(PageResult<MailAccountDO> pageResult); | |
| 25 | + | |
| 26 | + List<MailAccountSimpleRespVO> convertList02(List<MailAccountDO> list); | |
| 27 | + | |
| 28 | + default MailAccount convert(MailAccountDO account, String nickname) { | |
| 29 | + String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail(); | |
| 30 | + return new MailAccount().setFrom(from).setAuth(true) | |
| 31 | + .setUser(account.getUsername()).setPass(account.getPassword()) | |
| 32 | + .setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable()); | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailLogConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 6 | +import org.mapstruct.Mapper; | |
| 7 | +import org.mapstruct.factory.Mappers; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MailLogConvert { | |
| 11 | + | |
| 12 | + MailLogConvert INSTANCE = Mappers.getMapper(MailLogConvert.class); | |
| 13 | + | |
| 14 | + PageResult<MailLogRespVO> convertPage(PageResult<MailLogDO> pageResult); | |
| 15 | + | |
| 16 | + MailLogRespVO convert(MailLogDO bean); | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/mail/MailTemplateConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 6 | +import org.mapstruct.Mapper; | |
| 7 | +import org.mapstruct.factory.Mappers; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Mapper | |
| 12 | +public interface MailTemplateConvert { | |
| 13 | + | |
| 14 | + MailTemplateConvert INSTANCE = Mappers.getMapper(MailTemplateConvert.class); | |
| 15 | + | |
| 16 | + MailTemplateDO convert(MailTemplateUpdateReqVO bean); | |
| 17 | + | |
| 18 | + MailTemplateDO convert(MailTemplateCreateReqVO bean); | |
| 19 | + | |
| 20 | + MailTemplateRespVO convert(MailTemplateDO bean); | |
| 21 | + | |
| 22 | + PageResult<MailTemplateRespVO> convertPage(PageResult<MailTemplateDO> pageResult); | |
| 23 | + | |
| 24 | + List<MailTemplateSimpleRespVO> convertList02(List<MailTemplateDO> list); | |
| 25 | + | |
| 26 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/notify/NotifyMessageConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | |
| 6 | +import org.mapstruct.Mapper; | |
| 7 | +import org.mapstruct.factory.Mappers; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 站内信 Convert | |
| 13 | + * | |
| 14 | + * @author xrcoder | |
| 15 | + */ | |
| 16 | +@Mapper | |
| 17 | +public interface NotifyMessageConvert { | |
| 18 | + | |
| 19 | + NotifyMessageConvert INSTANCE = Mappers.getMapper(NotifyMessageConvert.class); | |
| 20 | + | |
| 21 | + NotifyMessageRespVO convert(NotifyMessageDO bean); | |
| 22 | + | |
| 23 | + List<NotifyMessageRespVO> convertList(List<NotifyMessageDO> list); | |
| 24 | + | |
| 25 | + PageResult<NotifyMessageRespVO> convertPage(PageResult<NotifyMessageDO> page); | |
| 26 | + | |
| 27 | + | |
| 28 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/notify/NotifyTemplateConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.notify; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | + | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateCreateReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateRespVO; | |
| 9 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateUpdateReqVO; | |
| 10 | +import org.mapstruct.Mapper; | |
| 11 | +import org.mapstruct.factory.Mappers; | |
| 12 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 站内信模版 Convert | |
| 16 | + * | |
| 17 | + * @author xrcoder | |
| 18 | + */ | |
| 19 | +@Mapper | |
| 20 | +public interface NotifyTemplateConvert { | |
| 21 | + | |
| 22 | + NotifyTemplateConvert INSTANCE = Mappers.getMapper(NotifyTemplateConvert.class); | |
| 23 | + | |
| 24 | + NotifyTemplateDO convert(NotifyTemplateCreateReqVO bean); | |
| 25 | + | |
| 26 | + NotifyTemplateDO convert(NotifyTemplateUpdateReqVO bean); | |
| 27 | + | |
| 28 | + NotifyTemplateRespVO convert(NotifyTemplateDO bean); | |
| 29 | + | |
| 30 | + List<NotifyTemplateRespVO> convertList(List<NotifyTemplateDO> list); | |
| 31 | + | |
| 32 | + PageResult<NotifyTemplateRespVO> convertPage(PageResult<NotifyTemplateDO> page); | |
| 33 | + | |
| 34 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 邮箱账号 DO | |
| 11 | + * | |
| 12 | + * 用途:配置发送邮箱的账号 | |
| 13 | + * | |
| 14 | + * @author wangjingyi | |
| 15 | + * @since 2022-03-21 | |
| 16 | + */ | |
| 17 | +@TableName(value = "system_mail_account", autoResultMap = true) | |
| 18 | +@Data | |
| 19 | +@EqualsAndHashCode(callSuper = true) | |
| 20 | +public class MailAccountDO extends BaseDO { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 主键 | |
| 24 | + */ | |
| 25 | + @TableId | |
| 26 | + private Long id; | |
| 27 | + /** | |
| 28 | + * 邮箱 | |
| 29 | + */ | |
| 30 | + private String mail; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 用户名 | |
| 34 | + */ | |
| 35 | + private String username; | |
| 36 | + /** | |
| 37 | + * 密码 | |
| 38 | + */ | |
| 39 | + private String password; | |
| 40 | + /** | |
| 41 | + * SMTP 服务器域名 | |
| 42 | + */ | |
| 43 | + private String host; | |
| 44 | + /** | |
| 45 | + * SMTP 服务器端口 | |
| 46 | + */ | |
| 47 | + private Integer port; | |
| 48 | + /** | |
| 49 | + * 是否开启 SSL | |
| 50 | + */ | |
| 51 | + private Boolean sslEnable; | |
| 52 | + | |
| 53 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailLogDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | +import cn.iocoder.yudao.module.system.enums.mail.MailSendStatusEnum; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 7 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 8 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 9 | +import lombok.*; | |
| 10 | + | |
| 11 | +import java.io.Serializable; | |
| 12 | +import java.util.Date; | |
| 13 | +import java.util.Map; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 邮箱日志 DO | |
| 17 | + * 记录每一次邮件的发送 | |
| 18 | + * | |
| 19 | + * @author wangjingyi | |
| 20 | + * @since 2022-03-21 | |
| 21 | + */ | |
| 22 | +@TableName(value = "system_mail_log", autoResultMap = true) | |
| 23 | +@Data | |
| 24 | +@EqualsAndHashCode(callSuper = true) | |
| 25 | +@ToString(callSuper = true) | |
| 26 | +@Builder | |
| 27 | +@AllArgsConstructor | |
| 28 | +@NoArgsConstructor | |
| 29 | +public class MailLogDO extends BaseDO implements Serializable { | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 日志编号,自增 | |
| 33 | + */ | |
| 34 | + private Long id; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 用户编码 | |
| 38 | + */ | |
| 39 | + private Long userId; | |
| 40 | + /** | |
| 41 | + * 用户类型 | |
| 42 | + * | |
| 43 | + * 枚举 {@link UserTypeEnum} | |
| 44 | + */ | |
| 45 | + private Integer userType; | |
| 46 | + /** | |
| 47 | + * 接收邮箱地址 | |
| 48 | + */ | |
| 49 | + private String toMail; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 邮箱账号编号 | |
| 53 | + * | |
| 54 | + * 关联 {@link MailAccountDO#getId()} | |
| 55 | + */ | |
| 56 | + private Long accountId; | |
| 57 | + /** | |
| 58 | + * 发送邮箱地址 | |
| 59 | + * | |
| 60 | + * 冗余 {@link MailAccountDO#getMail()} | |
| 61 | + */ | |
| 62 | + private String fromMail; | |
| 63 | + | |
| 64 | + // ========= 模板相关字段 ========= | |
| 65 | + /** | |
| 66 | + * 模版编号 | |
| 67 | + * | |
| 68 | + * 关联 {@link MailTemplateDO#getId()} | |
| 69 | + */ | |
| 70 | + private Long templateId; | |
| 71 | + /** | |
| 72 | + * 模版编码 | |
| 73 | + * | |
| 74 | + * 冗余 {@link MailTemplateDO#getCode()} | |
| 75 | + */ | |
| 76 | + private String templateCode; | |
| 77 | + /** | |
| 78 | + * 模版发送人名称 | |
| 79 | + * | |
| 80 | + * 冗余 {@link MailTemplateDO#getNickname()} | |
| 81 | + */ | |
| 82 | + private String templateNickname; | |
| 83 | + /** | |
| 84 | + * 模版标题 | |
| 85 | + */ | |
| 86 | + private String templateTitle; | |
| 87 | + /** | |
| 88 | + * 模版内容 | |
| 89 | + * | |
| 90 | + * 基于 {@link MailTemplateDO#getContent()} 格式化后的内容 | |
| 91 | + */ | |
| 92 | + private String templateContent; | |
| 93 | + /** | |
| 94 | + * 模版参数 | |
| 95 | + * | |
| 96 | + * 基于 {@link MailTemplateDO#getParams()} 输入后的参数 | |
| 97 | + */ | |
| 98 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 99 | + private Map<String, Object> templateParams; | |
| 100 | + | |
| 101 | + // ========= 发送相关字段 ========= | |
| 102 | + /** | |
| 103 | + * 发送状态 | |
| 104 | + * | |
| 105 | + * 枚举 {@link MailSendStatusEnum} | |
| 106 | + */ | |
| 107 | + private Integer sendStatus; | |
| 108 | + /** | |
| 109 | + * 发送时间 | |
| 110 | + */ | |
| 111 | + private Date sendTime; | |
| 112 | + /** | |
| 113 | + * 发送返回的消息 ID | |
| 114 | + */ | |
| 115 | + private String sendMessageId; | |
| 116 | + /** | |
| 117 | + * 发送异常 | |
| 118 | + */ | |
| 119 | + private String sendException; | |
| 120 | + | |
| 121 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailTemplateDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 7 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 8 | +import lombok.Data; | |
| 9 | +import lombok.EqualsAndHashCode; | |
| 10 | + | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 邮件模版 DO | |
| 15 | + * | |
| 16 | + * @author wangjingyi | |
| 17 | + * @since 2022-03-21 | |
| 18 | + */ | |
| 19 | +@TableName(value = "system_mail_template", autoResultMap = true) | |
| 20 | +@Data | |
| 21 | +@EqualsAndHashCode(callSuper = true) | |
| 22 | +public class MailTemplateDO extends BaseDO { | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 主键 | |
| 26 | + */ | |
| 27 | + private Long id; | |
| 28 | + /** | |
| 29 | + * 模版名称 | |
| 30 | + */ | |
| 31 | + private String name; | |
| 32 | + /** | |
| 33 | + * 模版编号 | |
| 34 | + */ | |
| 35 | + private String code; | |
| 36 | + /** | |
| 37 | + * 发送的邮箱账号编号 | |
| 38 | + * | |
| 39 | + * 关联 {@link MailAccountDO#getId()} | |
| 40 | + */ | |
| 41 | + private Long accountId; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 发送人名称 | |
| 45 | + */ | |
| 46 | + private String nickname; | |
| 47 | + /** | |
| 48 | + * 标题 | |
| 49 | + */ | |
| 50 | + private String title; | |
| 51 | + /** | |
| 52 | + * 内容 | |
| 53 | + */ | |
| 54 | + private String content; | |
| 55 | + /** | |
| 56 | + * 参数数组(自动根据内容生成) | |
| 57 | + */ | |
| 58 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 59 | + private List<String> params; | |
| 60 | + /** | |
| 61 | + * 状态 | |
| 62 | + * | |
| 63 | + * 枚举 {@link CommonStatusEnum} | |
| 64 | + */ | |
| 65 | + private Integer status; | |
| 66 | + /** | |
| 67 | + * 备注 | |
| 68 | + */ | |
| 69 | + private String remark; | |
| 70 | + | |
| 71 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notify/NotifyMessageDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 6 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 7 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 8 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 9 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 10 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 11 | +import lombok.*; | |
| 12 | + | |
| 13 | +import java.time.LocalDateTime; | |
| 14 | +import java.util.Date; | |
| 15 | +import java.util.Map; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * 站内信 DO | |
| 19 | + * | |
| 20 | + * @author xrcoder | |
| 21 | + */ | |
| 22 | +@TableName(value = "system_notify_message", autoResultMap = true) | |
| 23 | +@KeySequence("system_notify_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 24 | +@Data | |
| 25 | +@EqualsAndHashCode(callSuper = true) | |
| 26 | +@ToString(callSuper = true) | |
| 27 | +@Builder | |
| 28 | +@NoArgsConstructor | |
| 29 | +@AllArgsConstructor | |
| 30 | +public class NotifyMessageDO extends BaseDO { | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 站内信编号,自增 | |
| 34 | + */ | |
| 35 | + @TableId | |
| 36 | + private Long id; | |
| 37 | + /** | |
| 38 | + * 用户编号 | |
| 39 | + * | |
| 40 | + * 关联 MemberUserDO 的 id 字段、或者 AdminUserDO 的 id 字段 | |
| 41 | + */ | |
| 42 | + private Long userId; | |
| 43 | + /** | |
| 44 | + * 用户类型 | |
| 45 | + * | |
| 46 | + * 枚举 {@link UserTypeEnum} | |
| 47 | + */ | |
| 48 | + private Integer userType; | |
| 49 | + | |
| 50 | + // ========= 模板相关字段 ========= | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 模版编号 | |
| 54 | + * | |
| 55 | + * 关联 {@link NotifyTemplateDO#getId()} | |
| 56 | + */ | |
| 57 | + private Long templateId; | |
| 58 | + /** | |
| 59 | + * 模版编码 | |
| 60 | + * | |
| 61 | + * 关联 {@link NotifyTemplateDO#getCode()} | |
| 62 | + */ | |
| 63 | + private String templateCode; | |
| 64 | + /** | |
| 65 | + * 模版类型 | |
| 66 | + * | |
| 67 | + * 冗余 {@link NotifyTemplateDO#getType()} | |
| 68 | + */ | |
| 69 | + private Integer templateType; | |
| 70 | + /** | |
| 71 | + * 模版发送人名称 | |
| 72 | + * | |
| 73 | + * 冗余 {@link NotifyTemplateDO#getNickname()} | |
| 74 | + */ | |
| 75 | + private String templateNickname; | |
| 76 | + /** | |
| 77 | + * 模版内容 | |
| 78 | + * | |
| 79 | + * 基于 {@link NotifyTemplateDO#getContent()} 格式化后的内容 | |
| 80 | + */ | |
| 81 | + private String templateContent; | |
| 82 | + /** | |
| 83 | + * 模版参数 | |
| 84 | + * | |
| 85 | + * 基于 {@link NotifyTemplateDO#getParams()} 输入后的参数 | |
| 86 | + */ | |
| 87 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 88 | + private Map<String, Object> templateParams; | |
| 89 | + | |
| 90 | + // ========= 读取相关字段 ========= | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 是否已读 | |
| 94 | + */ | |
| 95 | + private Boolean readStatus; | |
| 96 | + /** | |
| 97 | + * 阅读时间 | |
| 98 | + */ | |
| 99 | + private LocalDateTime readTime; | |
| 100 | + | |
| 101 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notify/NotifyTemplateDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 7 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 8 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 9 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 10 | +import lombok.*; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 站内信模版 DO | |
| 16 | + * | |
| 17 | + * @author xrcoder | |
| 18 | + */ | |
| 19 | +@TableName(value = "system_notify_template", autoResultMap = true) | |
| 20 | +@KeySequence("system_notify_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 21 | +@Data | |
| 22 | +@EqualsAndHashCode(callSuper = true) | |
| 23 | +@ToString(callSuper = true) | |
| 24 | +@Builder | |
| 25 | +@NoArgsConstructor | |
| 26 | +@AllArgsConstructor | |
| 27 | +public class NotifyTemplateDO extends BaseDO { | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * ID | |
| 31 | + */ | |
| 32 | + @TableId | |
| 33 | + private Long id; | |
| 34 | + /** | |
| 35 | + * 模版名称 | |
| 36 | + */ | |
| 37 | + private String name; | |
| 38 | + /** | |
| 39 | + * 模版编码 | |
| 40 | + */ | |
| 41 | + private String code; | |
| 42 | + /** | |
| 43 | + * 模版类型 | |
| 44 | + * | |
| 45 | + * 对应 system_notify_template_type 字典 | |
| 46 | + */ | |
| 47 | + private Integer type; | |
| 48 | + /** | |
| 49 | + * 发送人名称 | |
| 50 | + */ | |
| 51 | + private String nickname; | |
| 52 | + /** | |
| 53 | + * 模版内容 | |
| 54 | + */ | |
| 55 | + private String content; | |
| 56 | + /** | |
| 57 | + * 参数数组 | |
| 58 | + */ | |
| 59 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 60 | + private List<String> params; | |
| 61 | + /** | |
| 62 | + * 状态 | |
| 63 | + * | |
| 64 | + * 枚举 {@link CommonStatusEnum} | |
| 65 | + */ | |
| 66 | + private Integer status; | |
| 67 | + /** | |
| 68 | + * 备注 | |
| 69 | + */ | |
| 70 | + private String remark; | |
| 71 | + | |
| 72 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailAccountMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | + | |
| 11 | +@Mapper | |
| 12 | +public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { | |
| 13 | + | |
| 14 | + default PageResult<MailAccountDO> selectPage(MailAccountPageReqVO pageReqVO) { | |
| 15 | + return selectPage(pageReqVO, new LambdaQueryWrapperX<MailAccountDO>() | |
| 16 | + .likeIfPresent(MailAccountDO::getMail, pageReqVO.getMail()) | |
| 17 | + .likeIfPresent(MailAccountDO::getUsername , pageReqVO.getUsername())); | |
| 18 | + } | |
| 19 | + | |
| 20 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailLogMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 8 | +import org.apache.ibatis.annotations.Mapper; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface MailLogMapper extends BaseMapperX<MailLogDO> { | |
| 12 | + | |
| 13 | + default PageResult<MailLogDO> selectPage(MailLogPageReqVO reqVO) { | |
| 14 | + return selectPage(reqVO, new LambdaQueryWrapperX<MailLogDO>() | |
| 15 | + .eqIfPresent(MailLogDO::getUserId, reqVO.getUserId()) | |
| 16 | + .eqIfPresent(MailLogDO::getUserType, reqVO.getUserType()) | |
| 17 | + .likeIfPresent(MailLogDO::getToMail, reqVO.getToMail()) | |
| 18 | + .eqIfPresent(MailLogDO::getAccountId, reqVO.getAccountId()) | |
| 19 | + .eqIfPresent(MailLogDO::getTemplateId, reqVO.getTemplateId()) | |
| 20 | + .eqIfPresent(MailLogDO::getSendStatus, reqVO.getSendStatus()) | |
| 21 | + .betweenIfPresent(MailLogDO::getSendTime, reqVO.getSendTime()) | |
| 22 | + .orderByDesc(MailLogDO::getId)); | |
| 23 | + } | |
| 24 | + | |
| 25 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailTemplateMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsTemplateDO; | |
| 10 | +import org.apache.ibatis.annotations.Mapper; | |
| 11 | +import org.apache.ibatis.annotations.Select; | |
| 12 | + | |
| 13 | +import java.util.Date; | |
| 14 | + | |
| 15 | +@Mapper | |
| 16 | +public interface MailTemplateMapper extends BaseMapperX<MailTemplateDO> { | |
| 17 | + | |
| 18 | + default PageResult<MailTemplateDO> selectPage(MailTemplatePageReqVO pageReqVO){ | |
| 19 | + return selectPage(pageReqVO , new LambdaQueryWrapperX<MailTemplateDO>() | |
| 20 | + .eqIfPresent(MailTemplateDO::getStatus, pageReqVO.getStatus()) | |
| 21 | + .likeIfPresent(MailTemplateDO::getCode, pageReqVO.getCode()) | |
| 22 | + .likeIfPresent(MailTemplateDO::getName, pageReqVO.getName()) | |
| 23 | + .eqIfPresent(MailTemplateDO::getAccountId, pageReqVO.getAccountId()) | |
| 24 | + .betweenIfPresent(MailTemplateDO::getCreateTime, pageReqVO.getCreateTime())); | |
| 25 | + } | |
| 26 | + | |
| 27 | + default Long selectCountByAccountId(Long accountId) { | |
| 28 | + return selectCount(MailTemplateDO::getAccountId, accountId); | |
| 29 | + } | |
| 30 | + | |
| 31 | + default MailTemplateDO selectByCode(String code) { | |
| 32 | + return selectOne(MailTemplateDO::getCode, code); | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notify/NotifyMessageMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageMyPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessagePageReqVO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | |
| 10 | +import org.apache.ibatis.annotations.Mapper; | |
| 11 | + | |
| 12 | +import java.time.LocalDateTime; | |
| 13 | +import java.util.Collection; | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +@Mapper | |
| 17 | +public interface NotifyMessageMapper extends BaseMapperX<NotifyMessageDO> { | |
| 18 | + | |
| 19 | + default PageResult<NotifyMessageDO> selectPage(NotifyMessagePageReqVO reqVO) { | |
| 20 | + return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>() | |
| 21 | + .eqIfPresent(NotifyMessageDO::getUserId, reqVO.getUserId()) | |
| 22 | + .eqIfPresent(NotifyMessageDO::getUserType, reqVO.getUserType()) | |
| 23 | + .likeIfPresent(NotifyMessageDO::getTemplateCode, reqVO.getTemplateCode()) | |
| 24 | + .eqIfPresent(NotifyMessageDO::getTemplateType, reqVO.getTemplateType()) | |
| 25 | + .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime()) | |
| 26 | + .orderByDesc(NotifyMessageDO::getId)); | |
| 27 | + } | |
| 28 | + | |
| 29 | + default PageResult<NotifyMessageDO> selectPage(NotifyMessageMyPageReqVO reqVO, Long userId, Integer userType) { | |
| 30 | + return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>() | |
| 31 | + .eqIfPresent(NotifyMessageDO::getReadStatus, reqVO.getReadStatus()) | |
| 32 | + .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime()) | |
| 33 | + .eq(NotifyMessageDO::getUserId, userId) | |
| 34 | + .eq(NotifyMessageDO::getUserType, userType) | |
| 35 | + .orderByDesc(NotifyMessageDO::getId)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + default int updateListRead(Collection<Long> ids, Long userId, Integer userType) { | |
| 39 | + return update(new NotifyMessageDO().setReadStatus(true).setReadTime(LocalDateTime.now()), | |
| 40 | + new LambdaQueryWrapperX<NotifyMessageDO>() | |
| 41 | + .in(NotifyMessageDO::getId, ids) | |
| 42 | + .eq(NotifyMessageDO::getUserId, userId) | |
| 43 | + .eq(NotifyMessageDO::getUserType, userType) | |
| 44 | + .eq(NotifyMessageDO::getReadStatus, false)); | |
| 45 | + } | |
| 46 | + | |
| 47 | + default int updateListRead(Long userId, Integer userType) { | |
| 48 | + return update(new NotifyMessageDO().setReadStatus(true).setReadTime(LocalDateTime.now()), | |
| 49 | + new LambdaQueryWrapperX<NotifyMessageDO>() | |
| 50 | + .eq(NotifyMessageDO::getUserId, userId) | |
| 51 | + .eq(NotifyMessageDO::getUserType, userType) | |
| 52 | + .eq(NotifyMessageDO::getReadStatus, false)); | |
| 53 | + } | |
| 54 | + | |
| 55 | + default List<NotifyMessageDO> selectUnreadListByUserIdAndUserType(Long userId, Integer userType, Integer size) { | |
| 56 | + return selectList(new QueryWrapperX<NotifyMessageDO>() // 由于要使用 limitN 语句,所以只能用 QueryWrapperX | |
| 57 | + .eq("user_id", userId) | |
| 58 | + .eq("user_type", userType) | |
| 59 | + .eq("read_status", false) | |
| 60 | + .orderByDesc("id").limitN(size)); | |
| 61 | + } | |
| 62 | + | |
| 63 | + default Long selectUnreadCountByUserIdAndUserType(Long userId, Integer userType) { | |
| 64 | + return selectCount(new LambdaQueryWrapperX<NotifyMessageDO>() | |
| 65 | + .eq(NotifyMessageDO::getReadStatus, false) | |
| 66 | + .eq(NotifyMessageDO::getUserId, userId) | |
| 67 | + .eq(NotifyMessageDO::getUserType, userType)); | |
| 68 | + } | |
| 69 | + | |
| 70 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notify/NotifyTemplateMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplatePageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 8 | +import org.apache.ibatis.annotations.Mapper; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface NotifyTemplateMapper extends BaseMapperX<NotifyTemplateDO> { | |
| 12 | + | |
| 13 | + default NotifyTemplateDO selectByCode(String code) { | |
| 14 | + return selectOne(NotifyTemplateDO::getCode, code); | |
| 15 | + } | |
| 16 | + | |
| 17 | + default PageResult<NotifyTemplateDO> selectPage(NotifyTemplatePageReqVO reqVO) { | |
| 18 | + return selectPage(reqVO, new LambdaQueryWrapperX<NotifyTemplateDO>() | |
| 19 | + .likeIfPresent(NotifyTemplateDO::getCode, reqVO.getCode()) | |
| 20 | + .likeIfPresent(NotifyTemplateDO::getName, reqVO.getName()) | |
| 21 | + .eqIfPresent(NotifyTemplateDO::getStatus, reqVO.getStatus()) | |
| 22 | + .betweenIfPresent(NotifyTemplateDO::getCreateTime, reqVO.getCreateTime()) | |
| 23 | + .orderByDesc(NotifyTemplateDO::getId)); | |
| 24 | + } | |
| 25 | + | |
| 26 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SmsCodeMapper.java
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailAccountRefreshConsumer.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.consumer.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; | |
| 4 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailAccountRefreshMessage; | |
| 5 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailTemplateRefreshMessage; | |
| 6 | +import cn.iocoder.yudao.module.system.service.mail.MailAccountService; | |
| 7 | +import cn.iocoder.yudao.module.system.service.mail.MailTemplateService; | |
| 8 | +import lombok.extern.slf4j.Slf4j; | |
| 9 | +import org.springframework.stereotype.Component; | |
| 10 | + | |
| 11 | +import javax.annotation.Resource; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 针对 {@link MailAccountRefreshMessage} 的消费者 | |
| 15 | + * | |
| 16 | + * @author wangjingyi | |
| 17 | + */ | |
| 18 | +@Component | |
| 19 | +@Slf4j | |
| 20 | +public class MailAccountRefreshConsumer extends AbstractChannelMessageListener<MailAccountRefreshMessage> { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private MailAccountService mailAccountService; | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + public void onMessage(MailAccountRefreshMessage message) { | |
| 27 | + log.info("[onMessage][收到 Mail Account 刷新信息]"); | |
| 28 | + mailAccountService.initLocalCache(); | |
| 29 | + } | |
| 30 | + | |
| 31 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailSendConsumer.java
| ... | ... | @@ -2,17 +2,29 @@ package cn.iocoder.yudao.module.system.mq.consumer.mail; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener; |
| 4 | 4 | import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; |
| 5 | +import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessage; | |
| 6 | +import cn.iocoder.yudao.module.system.service.mail.MailSendService; | |
| 5 | 7 | import lombok.extern.slf4j.Slf4j; |
| 6 | 8 | import org.springframework.stereotype.Component; |
| 7 | 9 | |
| 8 | -// TODO 芋艿:这个暂未实现 | |
| 10 | +import javax.annotation.Resource; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 针对 {@link MailSendMessage} 的消费者 | |
| 14 | + * | |
| 15 | + * @author 芋道源码 | |
| 16 | + */ | |
| 9 | 17 | @Component |
| 10 | 18 | @Slf4j |
| 11 | 19 | public class MailSendConsumer extends AbstractStreamMessageListener<MailSendMessage> { |
| 12 | 20 | |
| 21 | + @Resource | |
| 22 | + private MailSendService mailSendService; | |
| 23 | + | |
| 13 | 24 | @Override |
| 14 | 25 | public void onMessage(MailSendMessage message) { |
| 15 | 26 | log.info("[onMessage][消息内容({})]", message); |
| 27 | + mailSendService.doSendMail(message); | |
| 16 | 28 | } |
| 17 | 29 | |
| 18 | 30 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailTemplateRefreshConsumer.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.consumer.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; | |
| 4 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailTemplateRefreshMessage; | |
| 5 | +import cn.iocoder.yudao.module.system.service.mail.MailTemplateService; | |
| 6 | +import lombok.extern.slf4j.Slf4j; | |
| 7 | +import org.springframework.stereotype.Component; | |
| 8 | + | |
| 9 | +import javax.annotation.Resource; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 针对 {@link MailTemplateRefreshMessage} 的消费者 | |
| 13 | + * | |
| 14 | + * @author wangjingyi | |
| 15 | + */ | |
| 16 | +@Component | |
| 17 | +@Slf4j | |
| 18 | +public class MailTemplateRefreshConsumer extends AbstractChannelMessageListener<MailTemplateRefreshMessage> { | |
| 19 | + | |
| 20 | + @Resource | |
| 21 | + private MailTemplateService mailTemplateService; | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public void onMessage(MailTemplateRefreshMessage message) { | |
| 25 | + log.info("[onMessage][收到 Mail Template 刷新信息]"); | |
| 26 | + mailTemplateService.initLocalCache(); | |
| 27 | + } | |
| 28 | + | |
| 29 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/notify/NotifyTemplateRefreshConsumer.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.consumer.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; | |
| 4 | +import cn.iocoder.yudao.module.system.mq.message.notify.NotifyTemplateRefreshMessage; | |
| 5 | +import cn.iocoder.yudao.module.system.service.notify.NotifyTemplateService; | |
| 6 | +import lombok.extern.slf4j.Slf4j; | |
| 7 | +import org.springframework.stereotype.Component; | |
| 8 | + | |
| 9 | +import javax.annotation.Resource; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 针对 {@link NotifyTemplateRefreshMessage} 的消费者 | |
| 13 | + * | |
| 14 | + * @author xrcoder | |
| 15 | + */ | |
| 16 | +@Component | |
| 17 | +@Slf4j | |
| 18 | +public class NotifyTemplateRefreshConsumer extends AbstractChannelMessageListener<NotifyTemplateRefreshMessage> { | |
| 19 | + | |
| 20 | + @Resource | |
| 21 | + private NotifyTemplateService notifyTemplateService; | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public void onMessage(NotifyTemplateRefreshMessage message) { | |
| 25 | + log.info("[onMessage][收到 NotifyTemplate 刷新消息]"); | |
| 26 | + notifyTemplateService.initLocalCache(); | |
| 27 | + } | |
| 28 | + | |
| 29 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailAccountRefreshMessage.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.message.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessage; | |
| 4 | +import lombok.Data; | |
| 5 | +import lombok.EqualsAndHashCode; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 邮箱账号的数据刷新 Message | |
| 9 | + * | |
| 10 | + * @author wangjingyi | |
| 11 | + */ | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +public class MailAccountRefreshMessage extends AbstractChannelMessage { | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public String getChannel() { | |
| 18 | + return "system.mail-account.refresh"; | |
| 19 | + } | |
| 20 | + | |
| 21 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailSendMessage.java
| ... | ... | @@ -4,8 +4,8 @@ import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessage; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | import lombok.EqualsAndHashCode; |
| 6 | 6 | |
| 7 | +import javax.validation.constraints.NotEmpty; | |
| 7 | 8 | import javax.validation.constraints.NotNull; |
| 8 | -import java.util.Map; | |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * 邮箱发送消息 |
| ... | ... | @@ -17,28 +17,35 @@ import java.util.Map; |
| 17 | 17 | public class MailSendMessage extends AbstractStreamMessage { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * 邮箱地址 | |
| 20 | + * 邮件日志编号 | |
| 21 | 21 | */ |
| 22 | - @NotNull(message = "邮箱地址不能为空") | |
| 23 | - private String address; | |
| 22 | + @NotNull(message = "邮件日志编号不能为空") | |
| 23 | + private Long logId; | |
| 24 | 24 | /** |
| 25 | - * 短信模板编号 | |
| 25 | + * 接收邮件地址 | |
| 26 | 26 | */ |
| 27 | - @NotNull(message = "短信模板编号不能为空") | |
| 28 | - private String templateCode; | |
| 27 | + @NotNull(message = "接收邮件地址不能为空") | |
| 28 | + private String mail; | |
| 29 | 29 | /** |
| 30 | - * 短信模板参数 | |
| 30 | + * 邮件账号编号 | |
| 31 | 31 | */ |
| 32 | - private Map<String, Object> templateParams; | |
| 32 | + @NotNull(message = "邮件账号编号不能为空") | |
| 33 | + private Long accountId; | |
| 33 | 34 | |
| 34 | 35 | /** |
| 35 | - * 用户编号,允许空 | |
| 36 | + * 邮件发件人 | |
| 36 | 37 | */ |
| 37 | - private Integer userId; | |
| 38 | + private String nickname; | |
| 38 | 39 | /** |
| 39 | - * 用户类型,允许空 | |
| 40 | + * 邮件标题 | |
| 40 | 41 | */ |
| 41 | - private Integer userType; | |
| 42 | + @NotEmpty(message = "邮件标题不能为空") | |
| 43 | + private String title; | |
| 44 | + /** | |
| 45 | + * 邮件内容 | |
| 46 | + */ | |
| 47 | + @NotEmpty(message = "邮件内容不能为空") | |
| 48 | + private String content; | |
| 42 | 49 | |
| 43 | 50 | @Override |
| 44 | 51 | public String getStreamKey() { | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailTemplateRefreshMessage.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.message.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessage; | |
| 4 | +import lombok.Data; | |
| 5 | +import lombok.EqualsAndHashCode; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 邮箱模板的数据刷新 Message | |
| 9 | + * | |
| 10 | + * @author wangjingyi | |
| 11 | + */ | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +public class MailTemplateRefreshMessage extends AbstractChannelMessage { | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public String getChannel() { | |
| 18 | + return "system.mail-template.refresh"; | |
| 19 | + } | |
| 20 | + | |
| 21 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/message/notify/NotifyTemplateRefreshMessage.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.message.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessage; | |
| 4 | +import lombok.Data; | |
| 5 | +import lombok.EqualsAndHashCode; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 站内信模板的数据刷新 Message | |
| 9 | + * | |
| 10 | + * @author xrcoder | |
| 11 | + */ | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +public class NotifyTemplateRefreshMessage extends AbstractChannelMessage { | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public String getChannel() { | |
| 18 | + return "system.notify-template.refresh"; | |
| 19 | + } | |
| 20 | + | |
| 21 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/producer/mail/MailProducer.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.producer.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; | |
| 4 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailAccountRefreshMessage; | |
| 5 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; | |
| 6 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailTemplateRefreshMessage; | |
| 7 | +import lombok.extern.slf4j.Slf4j; | |
| 8 | +import org.springframework.stereotype.Component; | |
| 9 | + | |
| 10 | +import javax.annotation.Resource; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * Mail 邮件相关消息的 Producer | |
| 14 | + * | |
| 15 | + * @author wangjingyi | |
| 16 | + * @since 2021/4/19 13:33 | |
| 17 | + */ | |
| 18 | +@Slf4j | |
| 19 | +@Component | |
| 20 | +public class MailProducer { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private RedisMQTemplate redisMQTemplate; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 发送 {@link MailTemplateRefreshMessage} 消息 | |
| 27 | + */ | |
| 28 | + public void sendMailTemplateRefreshMessage() { | |
| 29 | + MailTemplateRefreshMessage message = new MailTemplateRefreshMessage(); | |
| 30 | + redisMQTemplate.send(message); | |
| 31 | + } | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 发送 {@link MailAccountRefreshMessage} 消息 | |
| 35 | + */ | |
| 36 | + public void sendMailAccountRefreshMessage() { | |
| 37 | + MailAccountRefreshMessage message = new MailAccountRefreshMessage(); | |
| 38 | + redisMQTemplate.send(message); | |
| 39 | + } | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 发送 {@link MailSendMessage} 消息 | |
| 43 | + * | |
| 44 | + * @param sendLogId 发送日志编码 | |
| 45 | + * @param mail 接收邮件地址 | |
| 46 | + * @param accountId 邮件账号编号 | |
| 47 | + * @param nickname 邮件发件人 | |
| 48 | + * @param title 邮件标题 | |
| 49 | + * @param content 邮件内容 | |
| 50 | + */ | |
| 51 | + public void sendMailSendMessage(Long sendLogId, String mail, Long accountId, | |
| 52 | + String nickname, String title, String content) { | |
| 53 | + MailSendMessage message = new MailSendMessage() | |
| 54 | + .setLogId(sendLogId).setMail(mail).setAccountId(accountId) | |
| 55 | + .setNickname(nickname).setTitle(title).setContent(content); | |
| 56 | + redisMQTemplate.send(message); | |
| 57 | + } | |
| 58 | + | |
| 59 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/producer/notify/NotifyProducer.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.mq.producer.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; | |
| 4 | +import cn.iocoder.yudao.module.system.mq.message.notify.NotifyTemplateRefreshMessage; | |
| 5 | +import lombok.extern.slf4j.Slf4j; | |
| 6 | +import org.springframework.stereotype.Component; | |
| 7 | + | |
| 8 | +import javax.annotation.Resource; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * Notify 站内信相关消息的 Producer | |
| 12 | + * | |
| 13 | + * @author xrcoder | |
| 14 | + * @since 2022-08-06 | |
| 15 | + */ | |
| 16 | +@Slf4j | |
| 17 | +@Component | |
| 18 | +public class NotifyProducer { | |
| 19 | + | |
| 20 | + @Resource | |
| 21 | + private RedisMQTemplate redisMQTemplate; | |
| 22 | + | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 发送 {@link NotifyTemplateRefreshMessage} 消息 | |
| 26 | + */ | |
| 27 | + public void sendNotifyTemplateRefreshMessage() { | |
| 28 | + NotifyTemplateRefreshMessage message = new NotifyTemplateRefreshMessage(); | |
| 29 | + redisMQTemplate.send(message); | |
| 30 | + } | |
| 31 | + | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailAccountService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountCreateReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountPageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountUpdateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 8 | + | |
| 9 | +import javax.validation.Valid; | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 邮箱账号 Service 接口 | |
| 14 | + * | |
| 15 | + * @author wangjingyi | |
| 16 | + * @since 2022-03-21 | |
| 17 | + */ | |
| 18 | +public interface MailAccountService { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 初始化邮箱账号的本地缓存 | |
| 22 | + */ | |
| 23 | + void initLocalCache(); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 从缓存中获取邮箱账号 | |
| 27 | + * | |
| 28 | + * @param id 编号 | |
| 29 | + * @return 邮箱账号 | |
| 30 | + */ | |
| 31 | + MailAccountDO getMailAccountFromCache(Long id); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 创建邮箱账号 | |
| 35 | + * | |
| 36 | + * @param createReqVO 邮箱账号信息 | |
| 37 | + * @return 编号 | |
| 38 | + */ | |
| 39 | + Long createMailAccount(@Valid MailAccountCreateReqVO createReqVO); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 修改邮箱账号 | |
| 43 | + * | |
| 44 | + * @param updateReqVO 邮箱账号信息 | |
| 45 | + */ | |
| 46 | + void updateMailAccount(@Valid MailAccountUpdateReqVO updateReqVO); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 删除邮箱账号 | |
| 50 | + * | |
| 51 | + * @param id 编号 | |
| 52 | + */ | |
| 53 | + void deleteMailAccount(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 获取邮箱账号信息 | |
| 57 | + * | |
| 58 | + * @param id 编号 | |
| 59 | + * @return 邮箱账号信息 | |
| 60 | + */ | |
| 61 | + MailAccountDO getMailAccount(Long id); | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 获取邮箱账号分页信息 | |
| 65 | + * | |
| 66 | + * @param pageReqVO 邮箱账号分页参数 | |
| 67 | + * @return 邮箱账号分页信息 | |
| 68 | + */ | |
| 69 | + PageResult<MailAccountDO> getMailAccountPage(MailAccountPageReqVO pageReqVO); | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 获取邮箱数组信息 | |
| 73 | + * | |
| 74 | + * @return 邮箱账号信息数组 | |
| 75 | + */ | |
| 76 | + List<MailAccountDO> getMailAccountList(); | |
| 77 | + | |
| 78 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailAccountServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountCreateReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountPageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountUpdateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailAccountMapper; | |
| 10 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 11 | +import lombok.Getter; | |
| 12 | +import lombok.extern.slf4j.Slf4j; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | + | |
| 16 | +import javax.annotation.PostConstruct; | |
| 17 | +import javax.annotation.Resource; | |
| 18 | +import java.util.List; | |
| 19 | +import java.util.Map; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 22 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | |
| 23 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 邮箱账号 Service 实现类 | |
| 27 | + * | |
| 28 | + * @author wangjingyi | |
| 29 | + * @since 2022-03-21 | |
| 30 | + */ | |
| 31 | +@Service | |
| 32 | +@Validated | |
| 33 | +@Slf4j | |
| 34 | +public class MailAccountServiceImpl implements MailAccountService { | |
| 35 | + | |
| 36 | + @Resource | |
| 37 | + private MailAccountMapper mailAccountMapper; | |
| 38 | + | |
| 39 | + @Resource | |
| 40 | + private MailTemplateService mailTemplateService; | |
| 41 | + | |
| 42 | + @Resource | |
| 43 | + private MailProducer mailProducer; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 邮箱账号缓存 | |
| 47 | + * key:邮箱账号编码 {@link MailAccountDO#getId()} | |
| 48 | + * | |
| 49 | + * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 | |
| 50 | + */ | |
| 51 | + @Getter | |
| 52 | + private volatile Map<Long, MailAccountDO> mailAccountCache; | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + @PostConstruct | |
| 56 | + public void initLocalCache() { | |
| 57 | + // 第一步:查询数据 | |
| 58 | + List<MailAccountDO> accounts = mailAccountMapper.selectList(); | |
| 59 | + log.info("[initLocalCache][缓存邮箱账号,数量:{}]", accounts.size()); | |
| 60 | + | |
| 61 | + // 第二步:构建缓存 | |
| 62 | + mailAccountCache = convertMap(accounts, MailAccountDO::getId); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @Override | |
| 66 | + public MailAccountDO getMailAccountFromCache(Long id) { | |
| 67 | + return mailAccountCache.get(id); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @Override | |
| 71 | + public Long createMailAccount(MailAccountCreateReqVO createReqVO) { | |
| 72 | + // 插入 | |
| 73 | + MailAccountDO account = MailAccountConvert.INSTANCE.convert(createReqVO); | |
| 74 | + mailAccountMapper.insert(account); | |
| 75 | + | |
| 76 | + // 发送刷新消息 | |
| 77 | + mailProducer.sendMailAccountRefreshMessage(); | |
| 78 | + return account.getId(); | |
| 79 | + } | |
| 80 | + | |
| 81 | + @Override | |
| 82 | + public void updateMailAccount(MailAccountUpdateReqVO updateReqVO) { | |
| 83 | + // 校验是否存在 | |
| 84 | + validateMailAccountExists(updateReqVO.getId()); | |
| 85 | + | |
| 86 | + // 更新 | |
| 87 | + MailAccountDO updateObj = MailAccountConvert.INSTANCE.convert(updateReqVO); | |
| 88 | + mailAccountMapper.updateById(updateObj); | |
| 89 | + // 发送刷新消息 | |
| 90 | + mailProducer.sendMailAccountRefreshMessage(); | |
| 91 | + } | |
| 92 | + | |
| 93 | + @Override | |
| 94 | + public void deleteMailAccount(Long id) { | |
| 95 | + // 校验是否存在账号 | |
| 96 | + validateMailAccountExists(id); | |
| 97 | + // 校验是否存在关联模版 | |
| 98 | + if (mailTemplateService.countByAccountId(id) > 0) { | |
| 99 | + throw exception(MAIL_ACCOUNT_RELATE_TEMPLATE_EXISTS); | |
| 100 | + } | |
| 101 | + | |
| 102 | + // 删除 | |
| 103 | + mailAccountMapper.deleteById(id); | |
| 104 | + // 发送刷新消息 | |
| 105 | + mailProducer.sendMailAccountRefreshMessage(); | |
| 106 | + } | |
| 107 | + | |
| 108 | + private void validateMailAccountExists(Long id) { | |
| 109 | + if (mailAccountMapper.selectById(id) == null) { | |
| 110 | + throw exception(MAIL_ACCOUNT_NOT_EXISTS); | |
| 111 | + } | |
| 112 | + } | |
| 113 | + | |
| 114 | + @Override | |
| 115 | + public MailAccountDO getMailAccount(Long id) { | |
| 116 | + return mailAccountMapper.selectById(id); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @Override | |
| 120 | + public PageResult<MailAccountDO> getMailAccountPage(MailAccountPageReqVO pageReqVO) { | |
| 121 | + return mailAccountMapper.selectPage(pageReqVO); | |
| 122 | + } | |
| 123 | + | |
| 124 | + @Override | |
| 125 | + public List<MailAccountDO> getMailAccountList() { | |
| 126 | + return mailAccountMapper.selectList(); | |
| 127 | + } | |
| 128 | + | |
| 129 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailLogService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 6 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 8 | + | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 邮件日志 Service 接口 | |
| 13 | + * | |
| 14 | + * @author wangjingyi | |
| 15 | + * @since 2022-03-21 | |
| 16 | + */ | |
| 17 | +public interface MailLogService { | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 邮件日志分页 | |
| 21 | + * | |
| 22 | + * @param pageVO 分页参数 | |
| 23 | + * @return 分页结果 | |
| 24 | + */ | |
| 25 | + PageResult<MailLogDO> getMailLogPage(MailLogPageReqVO pageVO); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 获得指定编号的邮件日志 | |
| 29 | + * | |
| 30 | + * @param id 日志编号 | |
| 31 | + * @return 邮件日志 | |
| 32 | + */ | |
| 33 | + MailLogDO getMailLog(Long id); | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 创建邮件日志 | |
| 37 | + * | |
| 38 | + * @param userId 用户编码 | |
| 39 | + * @param userType 用户类型 | |
| 40 | + * @param toMail 收件人邮件 | |
| 41 | + * @param account 邮件账号信息 | |
| 42 | + * @param template 模版信息 | |
| 43 | + * @param templateContent 模版内容 | |
| 44 | + * @param templateParams 模版参数 | |
| 45 | + * @param isSend 是否发送成功 | |
| 46 | + * @return 日志编号 | |
| 47 | + */ | |
| 48 | + Long createMailLog(Long userId, Integer userType, String toMail, | |
| 49 | + MailAccountDO account, MailTemplateDO template , | |
| 50 | + String templateContent, Map<String, Object> templateParams, Boolean isSend); | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 更新邮件发送结果 | |
| 54 | + * | |
| 55 | + * @param logId 日志编号 | |
| 56 | + * @param messageId 发送后的消息编号 | |
| 57 | + * @param exception 发送异常 | |
| 58 | + */ | |
| 59 | + void updateMailSendResult(Long logId, String messageId, Exception exception); | |
| 60 | + | |
| 61 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailLogServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 6 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailLogMapper; | |
| 9 | +import cn.iocoder.yudao.module.system.enums.mail.MailSendStatusEnum; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | +import org.springframework.validation.annotation.Validated; | |
| 12 | + | |
| 13 | +import javax.annotation.Resource; | |
| 14 | +import java.util.Date; | |
| 15 | +import java.util.Map; | |
| 16 | +import java.util.Objects; | |
| 17 | + | |
| 18 | +import static cn.hutool.core.exceptions.ExceptionUtil.getRootCauseMessage; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * 邮件日志 Service 实现类 | |
| 22 | + * | |
| 23 | + * @author wangjingyi | |
| 24 | + * @since 2022-03-21 | |
| 25 | + */ | |
| 26 | +@Service | |
| 27 | +@Validated | |
| 28 | +public class MailLogServiceImpl implements MailLogService { | |
| 29 | + | |
| 30 | + @Resource | |
| 31 | + private MailLogMapper mailLogMapper; | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public PageResult<MailLogDO> getMailLogPage(MailLogPageReqVO pageVO) { | |
| 35 | + return mailLogMapper.selectPage(pageVO); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public MailLogDO getMailLog(Long id) { | |
| 40 | + return mailLogMapper.selectById(id); | |
| 41 | + } | |
| 42 | + | |
| 43 | + @Override | |
| 44 | + public Long createMailLog(Long userId, Integer userType, String toMail, | |
| 45 | + MailAccountDO account, MailTemplateDO template, | |
| 46 | + String templateContent, Map<String, Object> templateParams, Boolean isSend) { | |
| 47 | + MailLogDO.MailLogDOBuilder logDOBuilder = MailLogDO.builder(); | |
| 48 | + // 根据是否要发送,设置状态 | |
| 49 | + logDOBuilder.sendStatus(Objects.equals(isSend, true) ? MailSendStatusEnum.INIT.getStatus() | |
| 50 | + : MailSendStatusEnum.IGNORE.getStatus()) | |
| 51 | + // 用户信息 | |
| 52 | + .userId(userId).userType(userType).toMail(toMail) | |
| 53 | + .accountId(account.getId()).fromMail(account.getMail()) | |
| 54 | + // 模板相关字段 | |
| 55 | + .templateId(template.getId()).templateCode(template.getCode()).templateNickname(template.getNickname()) | |
| 56 | + .templateTitle(template.getTitle()).templateContent(templateContent).templateParams(templateParams); | |
| 57 | + | |
| 58 | + // 插入数据库 | |
| 59 | + MailLogDO logDO = logDOBuilder.build(); | |
| 60 | + mailLogMapper.insert(logDO); | |
| 61 | + return logDO.getId(); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @Override | |
| 65 | + public void updateMailSendResult(Long logId, String messageId, Exception exception) { | |
| 66 | + // 1. 成功 | |
| 67 | + if (exception == null) { | |
| 68 | + mailLogMapper.updateById(new MailLogDO().setId(logId).setSendTime(new Date()) | |
| 69 | + .setSendStatus(MailSendStatusEnum.SUCCESS.getStatus()).setSendMessageId(messageId)); | |
| 70 | + return; | |
| 71 | + } | |
| 72 | + // 2. 失败 | |
| 73 | + mailLogMapper.updateById(new MailLogDO().setId(logId).setSendTime(new Date()) | |
| 74 | + .setSendStatus(MailSendStatusEnum.FAILURE.getStatus()).setSendException(getRootCauseMessage(exception))); | |
| 75 | + | |
| 76 | + } | |
| 77 | + | |
| 78 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; | |
| 4 | + | |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 邮件发送 Service 接口 | |
| 9 | + * | |
| 10 | + * @author wangjingyi | |
| 11 | + * @since 2022-03-21 | |
| 12 | + */ | |
| 13 | +public interface MailSendService { | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 发送单条邮件给管理后台的用户 | |
| 17 | + * | |
| 18 | + * @param mail 邮箱 | |
| 19 | + * @param userId 用户编码 | |
| 20 | + * @param templateCode 邮件模版编码 | |
| 21 | + * @param templateParams 邮件模版参数 | |
| 22 | + * @return 发送日志编号 | |
| 23 | + */ | |
| 24 | + Long sendSingleMailToAdmin(String mail, Long userId, | |
| 25 | + String templateCode, Map<String, Object> templateParams); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 发送单条邮件给用户 APP 的用户 | |
| 29 | + * | |
| 30 | + * @param mail 邮箱 | |
| 31 | + * @param userId 用户编码 | |
| 32 | + * @param templateCode 邮件模版编码 | |
| 33 | + * @param templateParams 邮件模版参数 | |
| 34 | + * @return 发送日志编号 | |
| 35 | + */ | |
| 36 | + Long sendSingleMailToMember(String mail, Long userId, | |
| 37 | + String templateCode, Map<String, Object> templateParams); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 发送单条邮件给用户 | |
| 41 | + * | |
| 42 | + * @param mail 邮箱 | |
| 43 | + * @param userId 用户编码 | |
| 44 | + * @param userType 用户类型 | |
| 45 | + * @param templateCode 邮件模版编码 | |
| 46 | + * @param templateParams 邮件模版参数 | |
| 47 | + * @return 发送日志编号 | |
| 48 | + */ | |
| 49 | + Long sendSingleMail(String mail, Long userId, Integer userType, | |
| 50 | + String templateCode, Map<String, Object> templateParams); | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 执行真正的邮件发送 | |
| 54 | + * 注意,该方法仅仅提供给 MQ Consumer 使用 | |
| 55 | + * | |
| 56 | + * @param message 邮件 | |
| 57 | + */ | |
| 58 | + void doSendMail(MailSendMessage message); | |
| 59 | + | |
| 60 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.StrUtil; | |
| 4 | +import cn.hutool.extra.mail.MailAccount; | |
| 5 | +import cn.hutool.extra.mail.MailUtil; | |
| 6 | +import cn.iocoder.yudao.framework.common.core.KeyValue; | |
| 7 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 8 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 9 | +import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 12 | +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 13 | +import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; | |
| 14 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 15 | +import cn.iocoder.yudao.module.system.service.member.MemberService; | |
| 16 | +import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 17 | +import com.google.common.annotations.VisibleForTesting; | |
| 18 | +import lombok.extern.slf4j.Slf4j; | |
| 19 | +import org.springframework.stereotype.Service; | |
| 20 | +import org.springframework.validation.annotation.Validated; | |
| 21 | + | |
| 22 | +import javax.annotation.Resource; | |
| 23 | +import java.util.List; | |
| 24 | +import java.util.Map; | |
| 25 | +import java.util.stream.Collectors; | |
| 26 | + | |
| 27 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 28 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 邮箱模版 服务实现类 | |
| 32 | + * | |
| 33 | + * @author wangjingyi | |
| 34 | + * @since 2022-03-21 | |
| 35 | + */ | |
| 36 | +@Service | |
| 37 | +@Validated | |
| 38 | +@Slf4j | |
| 39 | +public class MailSendServiceImpl implements MailSendService { | |
| 40 | + | |
| 41 | + @Resource | |
| 42 | + private AdminUserService adminUserService; | |
| 43 | + @Resource | |
| 44 | + private MemberService memberService; | |
| 45 | + | |
| 46 | + @Resource | |
| 47 | + private MailAccountService mailAccountService; | |
| 48 | + @Resource | |
| 49 | + private MailTemplateService mailTemplateService; | |
| 50 | + | |
| 51 | + @Resource | |
| 52 | + private MailLogService mailLogService; | |
| 53 | + @Resource | |
| 54 | + private MailProducer mailProducer; | |
| 55 | + | |
| 56 | + @Override | |
| 57 | + public Long sendSingleMailToAdmin(String mail, Long userId, | |
| 58 | + String templateCode, Map<String, Object> templateParams) { | |
| 59 | + // 如果 mail 为空,则加载用户编号对应的邮箱 | |
| 60 | + if (StrUtil.isEmpty(mail)) { | |
| 61 | + AdminUserDO user = adminUserService.getUser(userId); | |
| 62 | + if (user != null) { | |
| 63 | + mail = user.getEmail(); | |
| 64 | + } | |
| 65 | + } | |
| 66 | + // 执行发送 | |
| 67 | + return sendSingleMail(mail, userId, UserTypeEnum.ADMIN.getValue(), templateCode, templateParams); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @Override | |
| 71 | + public Long sendSingleMailToMember(String mail, Long userId, | |
| 72 | + String templateCode, Map<String, Object> templateParams) { | |
| 73 | + // 如果 mail 为空,则加载用户编号对应的邮箱 | |
| 74 | + if (StrUtil.isEmpty(mail)) { | |
| 75 | + mail = memberService.getMemberUserEmail(userId); | |
| 76 | + } | |
| 77 | + // 执行发送 | |
| 78 | + return sendSingleMail(mail, userId, UserTypeEnum.MEMBER.getValue(), templateCode, templateParams); | |
| 79 | + } | |
| 80 | + | |
| 81 | + @Override | |
| 82 | + public Long sendSingleMail(String mail, Long userId, Integer userType, | |
| 83 | + String templateCode, Map<String, Object> templateParams) { | |
| 84 | + // 校验邮箱模版是否合法 | |
| 85 | + MailTemplateDO template = checkMailTemplateValid(templateCode); | |
| 86 | + // 校验邮箱账号是否合法 | |
| 87 | + MailAccountDO account = checkMailAccountValid(template.getAccountId()); | |
| 88 | + | |
| 89 | + // 校验邮箱是否存在 | |
| 90 | + mail = checkMail(mail); | |
| 91 | + checkTemplateParams(template, templateParams); | |
| 92 | + | |
| 93 | + // 创建发送日志。如果模板被禁用,则不发送短信,只记录日志 | |
| 94 | + Boolean isSend = CommonStatusEnum.ENABLE.getStatus().equals(template.getStatus()); | |
| 95 | + String content = mailTemplateService.formatMailTemplateContent(template.getContent(), templateParams); | |
| 96 | + Long sendLogId = mailLogService.createMailLog(userId, userType, mail, | |
| 97 | + account, template, content, templateParams, isSend); | |
| 98 | + // 发送 MQ 消息,异步执行发送短信 | |
| 99 | + if (isSend) { | |
| 100 | + mailProducer.sendMailSendMessage(sendLogId, mail, account.getId(), | |
| 101 | + template.getNickname(), template.getTitle(), content); | |
| 102 | + } | |
| 103 | + return sendLogId; | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Override | |
| 107 | + public void doSendMail(MailSendMessage message) { | |
| 108 | + // 1. 创建发送账号 | |
| 109 | + MailAccountDO account = checkMailAccountValid(message.getAccountId()); | |
| 110 | + MailAccount mailAccount = MailAccountConvert.INSTANCE.convert(account, message.getNickname()); | |
| 111 | + // 2. 发送邮件 | |
| 112 | + try { | |
| 113 | + String messageId = MailUtil.send(mailAccount, message.getMail(), | |
| 114 | + message.getTitle(), message.getContent(),true); | |
| 115 | + // 3. 更新结果(成功) | |
| 116 | + mailLogService.updateMailSendResult(message.getLogId(), messageId, null); | |
| 117 | + } catch (Exception e) { | |
| 118 | + // 3. 更新结果(异常) | |
| 119 | + mailLogService.updateMailSendResult(message.getLogId(), null, e); | |
| 120 | + } | |
| 121 | + } | |
| 122 | + | |
| 123 | + @VisibleForTesting | |
| 124 | + public MailTemplateDO checkMailTemplateValid(String templateCode) { | |
| 125 | + // 获得邮件模板。考虑到效率,从缓存中获取 | |
| 126 | + MailTemplateDO template = mailTemplateService.getMailTemplateByCodeFromCache(templateCode); | |
| 127 | + // 邮件模板不存在 | |
| 128 | + if (template == null) { | |
| 129 | + throw exception(MAIL_TEMPLATE_NOT_EXISTS); | |
| 130 | + } | |
| 131 | + return template; | |
| 132 | + } | |
| 133 | + | |
| 134 | + @VisibleForTesting | |
| 135 | + public MailAccountDO checkMailAccountValid(Long accountId) { | |
| 136 | + // 获得邮箱账号。考虑到效率,从缓存中获取 | |
| 137 | + MailAccountDO account = mailAccountService.getMailAccountFromCache(accountId); | |
| 138 | + // 邮箱账号不存在 | |
| 139 | + if (account == null) { | |
| 140 | + throw exception(MAIL_ACCOUNT_NOT_EXISTS); | |
| 141 | + } | |
| 142 | + return account; | |
| 143 | + } | |
| 144 | + | |
| 145 | + @VisibleForTesting | |
| 146 | + public String checkMail(String mail) { | |
| 147 | + if (StrUtil.isEmpty(mail)) { | |
| 148 | + throw exception(MAIL_SEND_MAIL_NOT_EXISTS); | |
| 149 | + } | |
| 150 | + return mail; | |
| 151 | + } | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 校验邮件参数是否确实 | |
| 155 | + * | |
| 156 | + * @param template 邮箱模板 | |
| 157 | + * @param templateParams 参数列表 | |
| 158 | + */ | |
| 159 | + @VisibleForTesting | |
| 160 | + public void checkTemplateParams(MailTemplateDO template, Map<String, Object> templateParams) { | |
| 161 | + template.getParams().forEach(key -> { | |
| 162 | + Object value = templateParams.get(key); | |
| 163 | + if (value == null) { | |
| 164 | + throw exception(MAIL_SEND_TEMPLATE_PARAM_MISS, key); | |
| 165 | + } | |
| 166 | + }); | |
| 167 | + } | |
| 168 | + | |
| 169 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateCreateReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateUpdateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 8 | + | |
| 9 | +import javax.validation.Valid; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Map; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 邮件模版 Service 接口 | |
| 15 | + * | |
| 16 | + * @author wangjingyi | |
| 17 | + * @since 2022-03-21 | |
| 18 | + */ | |
| 19 | +public interface MailTemplateService { | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 初始化邮件模版的本地缓存 | |
| 23 | + */ | |
| 24 | + void initLocalCache(); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 邮件模版创建 | |
| 28 | + * | |
| 29 | + * @param createReqVO 邮件信息 | |
| 30 | + * @return 编号 | |
| 31 | + */ | |
| 32 | + Long createMailTemplate(@Valid MailTemplateCreateReqVO createReqVO); | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 邮件模版修改 | |
| 36 | + * | |
| 37 | + * @param updateReqVO 邮件信息 | |
| 38 | + */ | |
| 39 | + void updateMailTemplate(@Valid MailTemplateUpdateReqVO updateReqVO); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 邮件模版删除 | |
| 43 | + * | |
| 44 | + * @param id 编号 | |
| 45 | + */ | |
| 46 | + void deleteMailTemplate(Long id); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 获取邮件模版 | |
| 50 | + * | |
| 51 | + * @param id 编号 | |
| 52 | + * @return 邮件模版 | |
| 53 | + */ | |
| 54 | + MailTemplateDO getMailTemplate(Long id); | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 获取邮件模版分页 | |
| 58 | + * | |
| 59 | + * @param pageReqVO 模版信息 | |
| 60 | + * @return 邮件模版分页信息 | |
| 61 | + */ | |
| 62 | + PageResult<MailTemplateDO> getMailTemplatePage(MailTemplatePageReqVO pageReqVO); | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 获取邮件模板数组 | |
| 66 | + * | |
| 67 | + * @return 模版数组 | |
| 68 | + */ | |
| 69 | + List<MailTemplateDO> getMailTemplateList(); | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 从缓存中获取邮件模版 | |
| 73 | + * | |
| 74 | + * @param code 模板编码 | |
| 75 | + * @return 邮件模板 | |
| 76 | + */ | |
| 77 | + MailTemplateDO getMailTemplateByCodeFromCache(String code); | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 邮件模版内容合成 | |
| 81 | + * | |
| 82 | + * @param content 邮件模版 | |
| 83 | + * @param params 合成参数 | |
| 84 | + * @return 格式化后的内容 | |
| 85 | + */ | |
| 86 | + String formatMailTemplateContent(String content, Map<String, Object> params); | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 获得指定邮件账号下的邮件模板数量 | |
| 90 | + * | |
| 91 | + * @param accountId 账号编号 | |
| 92 | + * @return 数量 | |
| 93 | + */ | |
| 94 | + long countByAccountId(Long accountId); | |
| 95 | + | |
| 96 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.ObjUtil; | |
| 4 | +import cn.hutool.core.util.ReUtil; | |
| 5 | +import cn.hutool.core.util.StrUtil; | |
| 6 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateCreateReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; | |
| 9 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateUpdateReqVO; | |
| 10 | +import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 12 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailTemplateMapper; | |
| 13 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 14 | +import com.google.common.annotations.VisibleForTesting; | |
| 15 | +import lombok.Getter; | |
| 16 | +import lombok.extern.slf4j.Slf4j; | |
| 17 | +import org.springframework.stereotype.Service; | |
| 18 | +import org.springframework.validation.annotation.Validated; | |
| 19 | + | |
| 20 | +import javax.annotation.PostConstruct; | |
| 21 | +import javax.annotation.Resource; | |
| 22 | +import javax.validation.Valid; | |
| 23 | +import java.util.List; | |
| 24 | +import java.util.Map; | |
| 25 | +import java.util.regex.Pattern; | |
| 26 | + | |
| 27 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 28 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | |
| 29 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 30 | + | |
| 31 | +/** | |
| 32 | + * 邮箱模版 Service 实现类 | |
| 33 | + * | |
| 34 | + * @author wangjingyi | |
| 35 | + * @since 2022-03-21 | |
| 36 | + */ | |
| 37 | +@Service | |
| 38 | +@Validated | |
| 39 | +@Slf4j | |
| 40 | +public class MailTemplateServiceImpl implements MailTemplateService { | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 正则表达式,匹配 {} 中的变量 | |
| 44 | + */ | |
| 45 | + private static final Pattern PATTERN_PARAMS = Pattern.compile("\\{(.*?)}"); | |
| 46 | + | |
| 47 | + @Resource | |
| 48 | + private MailTemplateMapper mailTemplateMapper; | |
| 49 | + | |
| 50 | + @Resource | |
| 51 | + private MailProducer mailProducer; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 邮件模板缓存 | |
| 55 | + * key:邮件模版标识 {@link MailTemplateDO#getCode()} | |
| 56 | + * | |
| 57 | + * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 | |
| 58 | + */ | |
| 59 | + @Getter | |
| 60 | + private volatile Map<String, MailTemplateDO> mailTemplateCache; | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + @PostConstruct | |
| 64 | + public void initLocalCache() { | |
| 65 | + // 第一步:查询数据 | |
| 66 | + List<MailTemplateDO> templates = mailTemplateMapper.selectList(); | |
| 67 | + log.info("[initLocalCache][缓存邮件模版,数量:{}]", templates.size()); | |
| 68 | + | |
| 69 | + // 第二步:构建缓存 | |
| 70 | + mailTemplateCache = convertMap(templates, MailTemplateDO::getCode); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @Override | |
| 74 | + public Long createMailTemplate(MailTemplateCreateReqVO createReqVO) { | |
| 75 | + // 校验 code 是否唯一 | |
| 76 | + validateCodeUnique(null, createReqVO.getCode()); | |
| 77 | + | |
| 78 | + // 插入 | |
| 79 | + MailTemplateDO template = MailTemplateConvert.INSTANCE.convert(createReqVO) | |
| 80 | + .setParams(parseTemplateContentParams(createReqVO.getContent())); | |
| 81 | + mailTemplateMapper.insert(template); | |
| 82 | + // 发送刷新消息 | |
| 83 | + mailProducer.sendMailTemplateRefreshMessage(); | |
| 84 | + return template.getId(); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @Override | |
| 88 | + public void updateMailTemplate(@Valid MailTemplateUpdateReqVO updateReqVO) { | |
| 89 | + // 校验是否存在 | |
| 90 | + validateMailTemplateExists(updateReqVO.getId()); | |
| 91 | + // 校验 code 是否唯一 | |
| 92 | + validateCodeUnique(updateReqVO.getId(),updateReqVO.getCode()); | |
| 93 | + | |
| 94 | + // 更新 | |
| 95 | + MailTemplateDO updateObj = MailTemplateConvert.INSTANCE.convert(updateReqVO) | |
| 96 | + .setParams(parseTemplateContentParams(updateReqVO.getContent())); | |
| 97 | + mailTemplateMapper.updateById(updateObj); | |
| 98 | + // 发送刷新消息 | |
| 99 | + mailProducer.sendMailTemplateRefreshMessage(); | |
| 100 | + } | |
| 101 | + | |
| 102 | + @VisibleForTesting | |
| 103 | + public void validateCodeUnique(Long id, String code) { | |
| 104 | + MailTemplateDO template = mailTemplateMapper.selectByCode(code); | |
| 105 | + if (template == null) { | |
| 106 | + return; | |
| 107 | + } | |
| 108 | + // 存在 template 记录的情况下 | |
| 109 | + if (id == null // 新增时,说明重复 | |
| 110 | + || ObjUtil.notEqual(id, template.getId())) { // 更新时,如果 id 不一致,说明重复 | |
| 111 | + throw exception(MAIL_TEMPLATE_CODE_EXISTS); | |
| 112 | + } | |
| 113 | + } | |
| 114 | + | |
| 115 | + @Override | |
| 116 | + public void deleteMailTemplate(Long id) { | |
| 117 | + // 校验是否存在 | |
| 118 | + validateMailTemplateExists(id); | |
| 119 | + | |
| 120 | + // 删除 | |
| 121 | + mailTemplateMapper.deleteById(id); | |
| 122 | + // 发送刷新消息 | |
| 123 | + mailProducer.sendMailTemplateRefreshMessage(); | |
| 124 | + } | |
| 125 | + | |
| 126 | + private void validateMailTemplateExists(Long id) { | |
| 127 | + if (mailTemplateMapper.selectById(id) == null) { | |
| 128 | + throw exception(MAIL_TEMPLATE_NOT_EXISTS); | |
| 129 | + } | |
| 130 | + } | |
| 131 | + | |
| 132 | + @Override | |
| 133 | + public MailTemplateDO getMailTemplate(Long id) {return mailTemplateMapper.selectById(id);} | |
| 134 | + | |
| 135 | + @Override | |
| 136 | + public PageResult<MailTemplateDO> getMailTemplatePage(MailTemplatePageReqVO pageReqVO) { | |
| 137 | + return mailTemplateMapper.selectPage(pageReqVO); | |
| 138 | + } | |
| 139 | + | |
| 140 | + @Override | |
| 141 | + public List<MailTemplateDO> getMailTemplateList() {return mailTemplateMapper.selectList();} | |
| 142 | + | |
| 143 | + @Override | |
| 144 | + public MailTemplateDO getMailTemplateByCodeFromCache(String code) { | |
| 145 | + return mailTemplateCache.get(code); | |
| 146 | + } | |
| 147 | + | |
| 148 | + @Override | |
| 149 | + public String formatMailTemplateContent(String content, Map<String, Object> params) { | |
| 150 | + return StrUtil.format(content, params); | |
| 151 | + } | |
| 152 | + | |
| 153 | + @VisibleForTesting | |
| 154 | + public List<String> parseTemplateContentParams(String content) { | |
| 155 | + return ReUtil.findAllGroup1(PATTERN_PARAMS, content); | |
| 156 | + } | |
| 157 | + | |
| 158 | + @Override | |
| 159 | + public long countByAccountId(Long accountId) { | |
| 160 | + return mailTemplateMapper.selectCountByAccountId(accountId); | |
| 161 | + } | |
| 162 | + | |
| 163 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/member/MemberService.java
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/member/MemberServiceImpl.java
| ... | ... | @@ -21,14 +21,27 @@ public class MemberServiceImpl implements MemberService { |
| 21 | 21 | |
| 22 | 22 | @Override |
| 23 | 23 | public String getMemberUserMobile(Long id) { |
| 24 | - if (id == null) { | |
| 24 | + Object user = getMemberUser(id); | |
| 25 | + if (user == null) { | |
| 25 | 26 | return null; |
| 26 | 27 | } |
| 27 | - Object user = ReflectUtil.invoke(getMemberUserApi(), "getUser", id); | |
| 28 | + return ReflectUtil.invoke(user, "getMobile"); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public String getMemberUserEmail(Long id) { | |
| 33 | + Object user = getMemberUser(id); | |
| 28 | 34 | if (user == null) { |
| 29 | 35 | return null; |
| 30 | 36 | } |
| 31 | - return ReflectUtil.invoke(user, "getMobile"); | |
| 37 | + return ReflectUtil.invoke(user, "getEmail"); | |
| 38 | + } | |
| 39 | + | |
| 40 | + private Object getMemberUser(Long id) { | |
| 41 | + if (id == null) { | |
| 42 | + return null; | |
| 43 | + } | |
| 44 | + return ReflectUtil.invoke(getMemberUserApi(), "getUser", id); | |
| 32 | 45 | } |
| 33 | 46 | |
| 34 | 47 | private Object getMemberUserApi() { | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageMyPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessagePageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 8 | + | |
| 9 | +import java.util.Collection; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Map; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 站内信 Service 接口 | |
| 15 | + * | |
| 16 | + * @author xrcoder | |
| 17 | + */ | |
| 18 | +public interface NotifyMessageService { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 创建站内信 | |
| 22 | + * | |
| 23 | + * @param userId 用户编号 | |
| 24 | + * @param userType 用户类型 | |
| 25 | + * @param template 模版信息 | |
| 26 | + * @param templateContent 模版内容 | |
| 27 | + * @param templateParams 模版参数 | |
| 28 | + * @return 站内信编号 | |
| 29 | + */ | |
| 30 | + Long createNotifyMessage(Long userId, Integer userType, | |
| 31 | + NotifyTemplateDO template, String templateContent, Map<String, Object> templateParams); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 获得站内信分页 | |
| 35 | + * | |
| 36 | + * @param pageReqVO 分页查询 | |
| 37 | + * @return 站内信分页 | |
| 38 | + */ | |
| 39 | + PageResult<NotifyMessageDO> getNotifyMessagePage(NotifyMessagePageReqVO pageReqVO); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 获得【我的】站内信分页 | |
| 43 | + * | |
| 44 | + * @param pageReqVO 分页查询 | |
| 45 | + * @param userId 用户编号 | |
| 46 | + * @param userType 用户类型 | |
| 47 | + * @return 站内信分页 | |
| 48 | + */ | |
| 49 | + PageResult<NotifyMessageDO> getMyMyNotifyMessagePage(NotifyMessageMyPageReqVO pageReqVO, Long userId, Integer userType); | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 获得站内信 | |
| 53 | + * | |
| 54 | + * @param id 编号 | |
| 55 | + * @return 站内信 | |
| 56 | + */ | |
| 57 | + NotifyMessageDO getNotifyMessage(Long id); | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 获得【我的】未读站内信列表 | |
| 61 | + * | |
| 62 | + * @param userId 用户编号 | |
| 63 | + * @param userType 用户类型 | |
| 64 | + * @param size 数量 | |
| 65 | + * @return 站内信列表 | |
| 66 | + */ | |
| 67 | + List<NotifyMessageDO> getUnreadNotifyMessageList(Long userId, Integer userType, Integer size); | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 统计用户未读站内信条数 | |
| 71 | + * | |
| 72 | + * @param userId 用户编号 | |
| 73 | + * @param userType 用户类型 | |
| 74 | + * @return 返回未读站内信条数 | |
| 75 | + */ | |
| 76 | + Long getUnreadNotifyMessageCount(Long userId, Integer userType); | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 标记站内信为已读 | |
| 80 | + * | |
| 81 | + * @param ids 站内信编号集合 | |
| 82 | + * @param userId 用户编号 | |
| 83 | + * @param userType 用户类型 | |
| 84 | + * @return 更新到的条数 | |
| 85 | + */ | |
| 86 | + int updateNotifyMessageRead(Collection<Long> ids, Long userId, Integer userType); | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 标记所有站内信为已读 | |
| 90 | + * | |
| 91 | + * @param userId 用户编号 | |
| 92 | + * @param userType 用户类型 | |
| 93 | + * @return 更新到的条数 | |
| 94 | + */ | |
| 95 | + int updateAllNotifyMessageRead(Long userId, Integer userType); | |
| 96 | + | |
| 97 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessageMyPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyMessagePageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.mysql.notify.NotifyMessageMapper; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | +import org.springframework.validation.annotation.Validated; | |
| 11 | + | |
| 12 | +import javax.annotation.Resource; | |
| 13 | +import java.util.Collection; | |
| 14 | +import java.util.List; | |
| 15 | +import java.util.Map; | |
| 16 | + | |
| 17 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * 站内信 Service 实现类 | |
| 21 | + * | |
| 22 | + * @author xrcoder | |
| 23 | + */ | |
| 24 | +@Service | |
| 25 | +@Validated | |
| 26 | +public class NotifyMessageServiceImpl implements NotifyMessageService { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private NotifyMessageMapper notifyMessageMapper; | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public Long createNotifyMessage(Long userId, Integer userType, | |
| 33 | + NotifyTemplateDO template, String templateContent, Map<String, Object> templateParams) { | |
| 34 | + NotifyMessageDO message = new NotifyMessageDO().setUserId(userId).setUserType(userType) | |
| 35 | + .setTemplateId(template.getId()).setTemplateCode(template.getCode()) | |
| 36 | + .setTemplateType(template.getType()).setTemplateNickname(template.getNickname()) | |
| 37 | + .setTemplateContent(templateContent).setTemplateParams(templateParams).setReadStatus(false); | |
| 38 | + notifyMessageMapper.insert(message); | |
| 39 | + return message.getId(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public PageResult<NotifyMessageDO> getNotifyMessagePage(NotifyMessagePageReqVO pageReqVO) { | |
| 44 | + return notifyMessageMapper.selectPage(pageReqVO); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public PageResult<NotifyMessageDO> getMyMyNotifyMessagePage(NotifyMessageMyPageReqVO pageReqVO, Long userId, Integer userType) { | |
| 49 | + return notifyMessageMapper.selectPage(pageReqVO, userId, userType); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @Override | |
| 53 | + public NotifyMessageDO getNotifyMessage(Long id) { | |
| 54 | + return notifyMessageMapper.selectById(id); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public List<NotifyMessageDO> getUnreadNotifyMessageList(Long userId, Integer userType, Integer size) { | |
| 59 | + return notifyMessageMapper.selectUnreadListByUserIdAndUserType(userId, userType, size); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public Long getUnreadNotifyMessageCount(Long userId, Integer userType) { | |
| 64 | + return notifyMessageMapper.selectUnreadCountByUserIdAndUserType(userId, userType); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + public int updateNotifyMessageRead(Collection<Long> ids, Long userId, Integer userType) { | |
| 69 | + return notifyMessageMapper.updateListRead(ids, userId, userType); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @Override | |
| 73 | + public int updateAllNotifyMessageRead(Long userId, Integer userType) { | |
| 74 | + return notifyMessageMapper.updateListRead(userId, userType); | |
| 75 | + } | |
| 76 | + | |
| 77 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifySendService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * 站内信发送 Service 接口 | |
| 8 | + * | |
| 9 | + * @author xrcoder | |
| 10 | + */ | |
| 11 | +public interface NotifySendService { | |
| 12 | + | |
| 13 | + /** | |
| 14 | + * 发送单条站内信给管理后台的用户 | |
| 15 | + * | |
| 16 | + * 在 mobile 为空时,使用 userId 加载对应管理员的手机号 | |
| 17 | + * | |
| 18 | + * @param userId 用户编号 | |
| 19 | + * @param templateCode 短信模板编号 | |
| 20 | + * @param templateParams 短信模板参数 | |
| 21 | + * @return 发送日志编号 | |
| 22 | + */ | |
| 23 | + Long sendSingleNotifyToAdmin(Long userId, | |
| 24 | + String templateCode, Map<String, Object> templateParams); | |
| 25 | + /** | |
| 26 | + * 发送单条站内信给用户 APP 的用户 | |
| 27 | + * | |
| 28 | + * 在 mobile 为空时,使用 userId 加载对应会员的手机号 | |
| 29 | + * | |
| 30 | + * @param userId 用户编号 | |
| 31 | + * @param templateCode 站内信模板编号 | |
| 32 | + * @param templateParams 站内信模板参数 | |
| 33 | + * @return 发送日志编号 | |
| 34 | + */ | |
| 35 | + Long sendSingleNotifyToMember(Long userId, | |
| 36 | + String templateCode, Map<String, Object> templateParams); | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 发送单条站内信给用户 | |
| 40 | + * | |
| 41 | + * @param userId 用户编号 | |
| 42 | + * @param userType 用户类型 | |
| 43 | + * @param templateCode 站内信模板编号 | |
| 44 | + * @param templateParams 站内信模板参数 | |
| 45 | + * @return 发送日志编号 | |
| 46 | + */ | |
| 47 | + Long sendSingleNotify( Long userId, Integer userType, | |
| 48 | + String templateCode, Map<String, Object> templateParams); | |
| 49 | + | |
| 50 | + default void sendBatchNotify(List<String> mobiles, List<Long> userIds, Integer userType, | |
| 51 | + String templateCode, Map<String, Object> templateParams) { | |
| 52 | + throw new UnsupportedOperationException("暂时不支持该操作,感兴趣可以实现该功能哟!"); | |
| 53 | + } | |
| 54 | + | |
| 55 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifySendServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 6 | +import com.google.common.annotations.VisibleForTesting; | |
| 7 | +import lombok.extern.slf4j.Slf4j; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | +import org.springframework.validation.annotation.Validated; | |
| 10 | + | |
| 11 | +import javax.annotation.Resource; | |
| 12 | +import java.util.Map; | |
| 13 | +import java.util.Objects; | |
| 14 | + | |
| 15 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 16 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * 站内信发送 Service 实现类 | |
| 20 | + * | |
| 21 | + * @author xrcoder | |
| 22 | + */ | |
| 23 | +@Service | |
| 24 | +@Validated | |
| 25 | +@Slf4j | |
| 26 | +public class NotifySendServiceImpl implements NotifySendService { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private NotifyTemplateService notifyTemplateService; | |
| 30 | + | |
| 31 | + @Resource | |
| 32 | + private NotifyMessageService notifyMessageService; | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public Long sendSingleNotifyToAdmin(Long userId, String templateCode, Map<String, Object> templateParams) { | |
| 36 | + return sendSingleNotify(userId, UserTypeEnum.ADMIN.getValue(), templateCode, templateParams); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public Long sendSingleNotifyToMember(Long userId, String templateCode, Map<String, Object> templateParams) { | |
| 41 | + return sendSingleNotify(userId, UserTypeEnum.MEMBER.getValue(), templateCode, templateParams); | |
| 42 | + } | |
| 43 | + | |
| 44 | + @Override | |
| 45 | + public Long sendSingleNotify(Long userId, Integer userType, String templateCode, Map<String, Object> templateParams) { | |
| 46 | + // 校验模版 | |
| 47 | + NotifyTemplateDO template = checkNotifyTemplateValid(templateCode); | |
| 48 | + if (Objects.equals(template.getStatus(), CommonStatusEnum.DISABLE.getStatus())) { | |
| 49 | + log.info("[sendSingleNotify][模版({})已经关闭,无法给用户({}/{})发送]", templateCode, userId, userType); | |
| 50 | + return null; | |
| 51 | + } | |
| 52 | + // 校验参数 | |
| 53 | + checkTemplateParams(template, templateParams); | |
| 54 | + | |
| 55 | + // 发送站内信 | |
| 56 | + String content = notifyTemplateService.formatNotifyTemplateContent(template.getContent(), templateParams); | |
| 57 | + return notifyMessageService.createNotifyMessage(userId, userType, template, content, templateParams); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @VisibleForTesting | |
| 61 | + public NotifyTemplateDO checkNotifyTemplateValid(String templateCode) { | |
| 62 | + // 获得站内信模板。考虑到效率,从缓存中获取 | |
| 63 | + NotifyTemplateDO template = notifyTemplateService.getNotifyTemplateByCodeFromCache(templateCode); | |
| 64 | + // 站内信模板不存在 | |
| 65 | + if (template == null) { | |
| 66 | + throw exception(NOTICE_NOT_FOUND); | |
| 67 | + } | |
| 68 | + return template; | |
| 69 | + } | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 校验站内信模版参数是否确实 | |
| 73 | + * | |
| 74 | + * @param template 邮箱模板 | |
| 75 | + * @param templateParams 参数列表 | |
| 76 | + */ | |
| 77 | + @VisibleForTesting | |
| 78 | + public void checkTemplateParams(NotifyTemplateDO template, Map<String, Object> templateParams) { | |
| 79 | + template.getParams().forEach(key -> { | |
| 80 | + Object value = templateParams.get(key); | |
| 81 | + if (value == null) { | |
| 82 | + throw exception(NOTIFY_SEND_TEMPLATE_PARAM_MISS, key); | |
| 83 | + } | |
| 84 | + }); | |
| 85 | + } | |
| 86 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyTemplateService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateCreateReqVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplatePageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateUpdateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 8 | + | |
| 9 | +import javax.validation.Valid; | |
| 10 | +import java.util.Map; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 站内信模版 Service 接口 | |
| 14 | + * | |
| 15 | + * @author xrcoder | |
| 16 | + */ | |
| 17 | +public interface NotifyTemplateService { | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 初始化站内信模板的本地缓存 | |
| 21 | + */ | |
| 22 | + void initLocalCache(); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 获得站内信模板,从缓存中 | |
| 26 | + * | |
| 27 | + * @param code 模板编码 | |
| 28 | + * @return 站内信模板 | |
| 29 | + */ | |
| 30 | + NotifyTemplateDO getNotifyTemplateByCodeFromCache(String code); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 创建站内信模版 | |
| 34 | + * | |
| 35 | + * @param createReqVO 创建信息 | |
| 36 | + * @return 编号 | |
| 37 | + */ | |
| 38 | + Long createNotifyTemplate(@Valid NotifyTemplateCreateReqVO createReqVO); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 更新站内信模版 | |
| 42 | + * | |
| 43 | + * @param updateReqVO 更新信息 | |
| 44 | + */ | |
| 45 | + void updateNotifyTemplate(@Valid NotifyTemplateUpdateReqVO updateReqVO); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 删除站内信模版 | |
| 49 | + * | |
| 50 | + * @param id 编号 | |
| 51 | + */ | |
| 52 | + void deleteNotifyTemplate(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得站内信模版 | |
| 56 | + * | |
| 57 | + * @param id 编号 | |
| 58 | + * @return 站内信模版 | |
| 59 | + */ | |
| 60 | + NotifyTemplateDO getNotifyTemplate(Long id); | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 获得站内信模版分页 | |
| 64 | + * | |
| 65 | + * @param pageReqVO 分页查询 | |
| 66 | + * @return 站内信模版分页 | |
| 67 | + */ | |
| 68 | + PageResult<NotifyTemplateDO> getNotifyTemplatePage(NotifyTemplatePageReqVO pageReqVO); | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 格式化站内信内容 | |
| 72 | + * | |
| 73 | + * @param content 站内信模板的内容 | |
| 74 | + * @param params 站内信内容的参数 | |
| 75 | + * @return 格式化后的内容 | |
| 76 | + */ | |
| 77 | + String formatNotifyTemplateContent(String content, Map<String, Object> params); | |
| 78 | + | |
| 79 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyTemplateServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.notify; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.ReUtil; | |
| 4 | +import cn.hutool.core.util.StrUtil; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateCreateReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplatePageReqVO; | |
| 9 | +import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.NotifyTemplateUpdateReqVO; | |
| 10 | +import cn.iocoder.yudao.module.system.convert.notify.NotifyTemplateConvert; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | |
| 12 | +import cn.iocoder.yudao.module.system.dal.mysql.notify.NotifyTemplateMapper; | |
| 13 | +import cn.iocoder.yudao.module.system.mq.producer.notify.NotifyProducer; | |
| 14 | +import com.google.common.annotations.VisibleForTesting; | |
| 15 | +import lombok.extern.slf4j.Slf4j; | |
| 16 | +import org.springframework.stereotype.Service; | |
| 17 | +import org.springframework.validation.annotation.Validated; | |
| 18 | + | |
| 19 | +import javax.annotation.PostConstruct; | |
| 20 | +import javax.annotation.Resource; | |
| 21 | +import java.util.List; | |
| 22 | +import java.util.Map; | |
| 23 | +import java.util.regex.Pattern; | |
| 24 | + | |
| 25 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 26 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 站内信模版 Service 实现类 | |
| 30 | + * | |
| 31 | + * @author xrcoder | |
| 32 | + */ | |
| 33 | +@Service | |
| 34 | +@Validated | |
| 35 | +@Slf4j | |
| 36 | +public class NotifyTemplateServiceImpl implements NotifyTemplateService { | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 正则表达式,匹配 {} 中的变量 | |
| 40 | + */ | |
| 41 | + private static final Pattern PATTERN_PARAMS = Pattern.compile("\\{(.*?)}"); | |
| 42 | + | |
| 43 | + @Resource | |
| 44 | + private NotifyTemplateMapper notifyTemplateMapper; | |
| 45 | + | |
| 46 | + @Resource | |
| 47 | + private NotifyProducer notifyProducer; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 站内信模板缓存 | |
| 51 | + * key:站内信模板编码 {@link NotifyTemplateDO#getCode()} | |
| 52 | + * <p> | |
| 53 | + * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 | |
| 54 | + */ | |
| 55 | + private volatile Map<String, NotifyTemplateDO> notifyTemplateCache; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 初始化站内信模板的本地缓存 | |
| 59 | + */ | |
| 60 | + @Override | |
| 61 | + @PostConstruct | |
| 62 | + public void initLocalCache() { | |
| 63 | + // 第一步:查询数据 | |
| 64 | + List<NotifyTemplateDO> templates = notifyTemplateMapper.selectList(); | |
| 65 | + log.info("[initLocalCache][缓存站内信模版,数量为:{}]", templates.size()); | |
| 66 | + | |
| 67 | + // 第二步:构建缓存 | |
| 68 | + notifyTemplateCache = CollectionUtils.convertMap(templates, NotifyTemplateDO::getCode); | |
| 69 | + } | |
| 70 | + | |
| 71 | + @Override | |
| 72 | + public NotifyTemplateDO getNotifyTemplateByCodeFromCache(String code) { | |
| 73 | + return notifyTemplateCache.get(code); | |
| 74 | + } | |
| 75 | + | |
| 76 | + @Override | |
| 77 | + public Long createNotifyTemplate(NotifyTemplateCreateReqVO createReqVO) { | |
| 78 | + // 校验站内信编码是否重复 | |
| 79 | + checkNotifyTemplateCodeDuplicate(null, createReqVO.getCode()); | |
| 80 | + | |
| 81 | + // 插入 | |
| 82 | + NotifyTemplateDO notifyTemplate = NotifyTemplateConvert.INSTANCE.convert(createReqVO); | |
| 83 | + notifyTemplate.setParams(parseTemplateContentParams(notifyTemplate.getContent())); | |
| 84 | + notifyTemplateMapper.insert(notifyTemplate); | |
| 85 | + | |
| 86 | + // 发送刷新消息 | |
| 87 | + notifyProducer.sendNotifyTemplateRefreshMessage(); | |
| 88 | + return notifyTemplate.getId(); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @Override | |
| 92 | + public void updateNotifyTemplate(NotifyTemplateUpdateReqVO updateReqVO) { | |
| 93 | + // 校验存在 | |
| 94 | + validateNotifyTemplateExists(updateReqVO.getId()); | |
| 95 | + // 校验站内信编码是否重复 | |
| 96 | + checkNotifyTemplateCodeDuplicate(updateReqVO.getId(), updateReqVO.getCode()); | |
| 97 | + | |
| 98 | + // 更新 | |
| 99 | + NotifyTemplateDO updateObj = NotifyTemplateConvert.INSTANCE.convert(updateReqVO); | |
| 100 | + updateObj.setParams(parseTemplateContentParams(updateObj.getContent())); | |
| 101 | + notifyTemplateMapper.updateById(updateObj); | |
| 102 | + | |
| 103 | + // 发送刷新消息 | |
| 104 | + notifyProducer.sendNotifyTemplateRefreshMessage(); | |
| 105 | + } | |
| 106 | + | |
| 107 | + @VisibleForTesting | |
| 108 | + public List<String> parseTemplateContentParams(String content) { | |
| 109 | + return ReUtil.findAllGroup1(PATTERN_PARAMS, content); | |
| 110 | + } | |
| 111 | + | |
| 112 | + @Override | |
| 113 | + public void deleteNotifyTemplate(Long id) { | |
| 114 | + // 校验存在 | |
| 115 | + validateNotifyTemplateExists(id); | |
| 116 | + // 删除 | |
| 117 | + notifyTemplateMapper.deleteById(id); | |
| 118 | + // 发送刷新消息 | |
| 119 | + notifyProducer.sendNotifyTemplateRefreshMessage(); | |
| 120 | + } | |
| 121 | + | |
| 122 | + private void validateNotifyTemplateExists(Long id) { | |
| 123 | + if (notifyTemplateMapper.selectById(id) == null) { | |
| 124 | + throw exception(NOTIFY_TEMPLATE_NOT_EXISTS); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + | |
| 128 | + @Override | |
| 129 | + public NotifyTemplateDO getNotifyTemplate(Long id) { | |
| 130 | + return notifyTemplateMapper.selectById(id); | |
| 131 | + } | |
| 132 | + | |
| 133 | + @Override | |
| 134 | + public PageResult<NotifyTemplateDO> getNotifyTemplatePage(NotifyTemplatePageReqVO pageReqVO) { | |
| 135 | + return notifyTemplateMapper.selectPage(pageReqVO); | |
| 136 | + } | |
| 137 | + | |
| 138 | + @VisibleForTesting | |
| 139 | + public void checkNotifyTemplateCodeDuplicate(Long id, String code) { | |
| 140 | + NotifyTemplateDO template = notifyTemplateMapper.selectByCode(code); | |
| 141 | + if (template == null) { | |
| 142 | + return; | |
| 143 | + } | |
| 144 | + // 如果 id 为空,说明不用比较是否为相同 id 的字典类型 | |
| 145 | + if (id == null) { | |
| 146 | + throw exception(NOTIFY_TEMPLATE_CODE_DUPLICATE, code); | |
| 147 | + } | |
| 148 | + if (!template.getId().equals(id)) { | |
| 149 | + throw exception(NOTIFY_TEMPLATE_CODE_DUPLICATE, code); | |
| 150 | + } | |
| 151 | + } | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 格式化站内信内容 | |
| 155 | + * | |
| 156 | + * @param content 站内信模板的内容 | |
| 157 | + * @param params 站内信内容的参数 | |
| 158 | + * @return 格式化后的内容 | |
| 159 | + */ | |
| 160 | + @Override | |
| 161 | + public String formatNotifyTemplateContent(String content, Map<String, Object> params) { | |
| 162 | + return StrUtil.format(content, params); | |
| 163 | + } | |
| 164 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceImpl.java
| ... | ... | @@ -81,7 +81,7 @@ public class SmsChannelServiceImpl implements SmsChannelService { |
| 81 | 81 | public void deleteSmsChannel(Long id) { |
| 82 | 82 | // 校验存在 |
| 83 | 83 | this.validateSmsChannelExists(id); |
| 84 | - // 校验是否有字典数据 | |
| 84 | + // 校验是否有在使用该账号的模版 | |
| 85 | 85 | if (smsTemplateService.countByChannelId(id) > 0) { |
| 86 | 86 | throw exception(SMS_CHANNEL_HAS_CHILDREN); |
| 87 | 87 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailAccountServiceImplTest.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountCreateReqVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.MailAccountUpdateReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailAccountMapper; | |
| 11 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 12 | +import org.junit.jupiter.api.Test; | |
| 13 | +import org.springframework.boot.test.mock.mockito.MockBean; | |
| 14 | +import org.springframework.context.annotation.Import; | |
| 15 | + | |
| 16 | +import javax.annotation.Resource; | |
| 17 | + | |
| 18 | +import java.util.Map; | |
| 19 | + | |
| 20 | +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | |
| 21 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | |
| 22 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | |
| 23 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | |
| 24 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.MAIL_ACCOUNT_NOT_EXISTS; | |
| 25 | +import static org.junit.jupiter.api.Assertions.*; | |
| 26 | +import static org.mockito.Mockito.verify; | |
| 27 | + | |
| 28 | +/** | |
| 29 | +* {@link MailAccountServiceImpl} 的单元测试类 | |
| 30 | +* | |
| 31 | +* @author 芋道源码 | |
| 32 | +*/ | |
| 33 | +@Import(MailAccountServiceImpl.class) | |
| 34 | +public class MailAccountServiceImplTest extends BaseDbUnitTest { | |
| 35 | + | |
| 36 | + @Resource | |
| 37 | + private MailAccountServiceImpl mailAccountService; | |
| 38 | + | |
| 39 | + @Resource | |
| 40 | + private MailAccountMapper mailAccountMapper; | |
| 41 | + | |
| 42 | + @MockBean | |
| 43 | + private MailTemplateService mailTemplateService; | |
| 44 | + @MockBean | |
| 45 | + private MailProducer mailProducer; | |
| 46 | + | |
| 47 | + @Test | |
| 48 | + public void testInitLocalCache() { | |
| 49 | + MailAccountDO accountDO1 = randomPojo(MailAccountDO.class); | |
| 50 | + mailAccountMapper.insert(accountDO1); | |
| 51 | + MailAccountDO accountDO02 = randomPojo(MailAccountDO.class); | |
| 52 | + mailAccountMapper.insert(accountDO02); | |
| 53 | + | |
| 54 | + // 调用 | |
| 55 | + mailAccountService.initLocalCache(); | |
| 56 | + // 断言 mailAccountCache 缓存 | |
| 57 | + Map<Long, MailAccountDO> mailAccountCache = mailAccountService.getMailAccountCache(); | |
| 58 | + assertPojoEquals(accountDO1, mailAccountCache.get(accountDO1.getId())); | |
| 59 | + assertPojoEquals(accountDO02, mailAccountCache.get(accountDO02.getId())); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Test | |
| 63 | + public void testCreateMailAccount_success() { | |
| 64 | + // 准备参数 | |
| 65 | + MailAccountCreateReqVO reqVO = randomPojo(MailAccountCreateReqVO.class, o -> o.setMail(randomEmail())); | |
| 66 | + | |
| 67 | + // 调用 | |
| 68 | + Long mailAccountId = mailAccountService.createMailAccount(reqVO); | |
| 69 | + // 断言 | |
| 70 | + assertNotNull(mailAccountId); | |
| 71 | + // 校验记录的属性是否正确 | |
| 72 | + MailAccountDO mailAccount = mailAccountMapper.selectById(mailAccountId); | |
| 73 | + assertPojoEquals(reqVO, mailAccount); | |
| 74 | + verify(mailProducer).sendMailAccountRefreshMessage(); | |
| 75 | + } | |
| 76 | + | |
| 77 | + @Test | |
| 78 | + public void testUpdateMailAccount_success() { | |
| 79 | + // mock 数据 | |
| 80 | + MailAccountDO dbMailAccount = randomPojo(MailAccountDO.class); | |
| 81 | + mailAccountMapper.insert(dbMailAccount);// @Sql: 先插入出一条存在的数据 | |
| 82 | + // 准备参数 | |
| 83 | + MailAccountUpdateReqVO reqVO = randomPojo(MailAccountUpdateReqVO.class, o -> { | |
| 84 | + o.setId(dbMailAccount.getId()); // 设置更新的 ID | |
| 85 | + o.setMail(randomEmail()); | |
| 86 | + }); | |
| 87 | + | |
| 88 | + // 调用 | |
| 89 | + mailAccountService.updateMailAccount(reqVO); | |
| 90 | + // 校验是否更新正确 | |
| 91 | + MailAccountDO mailAccount = mailAccountMapper.selectById(reqVO.getId()); // 获取最新的 | |
| 92 | + assertPojoEquals(reqVO, mailAccount); | |
| 93 | + verify(mailProducer).sendMailAccountRefreshMessage(); | |
| 94 | + } | |
| 95 | + | |
| 96 | + @Test | |
| 97 | + public void testUpdateMailAccount_notExists() { | |
| 98 | + // 准备参数 | |
| 99 | + MailAccountUpdateReqVO reqVO = randomPojo(MailAccountUpdateReqVO.class); | |
| 100 | + | |
| 101 | + // 调用, 并断言异常 | |
| 102 | + assertServiceException(() -> mailAccountService.updateMailAccount(reqVO), MAIL_ACCOUNT_NOT_EXISTS); | |
| 103 | + } | |
| 104 | + | |
| 105 | + @Test | |
| 106 | + public void testDeleteMailAccount_success() { | |
| 107 | + // mock 数据 | |
| 108 | + MailAccountDO dbMailAccount = randomPojo(MailAccountDO.class); | |
| 109 | + mailAccountMapper.insert(dbMailAccount);// @Sql: 先插入出一条存在的数据 | |
| 110 | + // 准备参数 | |
| 111 | + Long id = dbMailAccount.getId(); | |
| 112 | + | |
| 113 | + // 调用 | |
| 114 | + mailAccountService.deleteMailAccount(id); | |
| 115 | + // 校验数据不存在了 | |
| 116 | + assertNull(mailAccountMapper.selectById(id)); | |
| 117 | + verify(mailProducer).sendMailAccountRefreshMessage(); | |
| 118 | + } | |
| 119 | + | |
| 120 | + @Test | |
| 121 | + public void testDeleteMailAccount_notExists() { | |
| 122 | + // 准备参数 | |
| 123 | + Long id = randomLongId(); | |
| 124 | + | |
| 125 | + // 调用, 并断言异常 | |
| 126 | + assertServiceException(() -> mailAccountService.deleteMailAccount(id), MAIL_ACCOUNT_NOT_EXISTS); | |
| 127 | + } | |
| 128 | + | |
| 129 | + @Test | |
| 130 | + public void testGetMailAccountPage() { | |
| 131 | + // mock 数据 | |
| 132 | + MailAccountDO dbMailAccount = randomPojo(MailAccountDO.class, o -> { // 等会查询到 | |
| 133 | + o.setMail("768@qq.com"); | |
| 134 | + o.setUsername("yunai"); | |
| 135 | + }); | |
| 136 | + mailAccountMapper.insert(dbMailAccount); | |
| 137 | + // 测试 mail 不匹配 | |
| 138 | + mailAccountMapper.insert(cloneIgnoreId(dbMailAccount, o -> o.setMail("788@qq.com"))); | |
| 139 | + // 测试 username 不匹配 | |
| 140 | + mailAccountMapper.insert(cloneIgnoreId(dbMailAccount, o -> o.setUsername("tudou"))); | |
| 141 | + // 准备参数 | |
| 142 | + MailAccountPageReqVO reqVO = new MailAccountPageReqVO(); | |
| 143 | + reqVO.setMail("768"); | |
| 144 | + reqVO.setUsername("yu"); | |
| 145 | + | |
| 146 | + // 调用 | |
| 147 | + PageResult<MailAccountDO> pageResult = mailAccountService.getMailAccountPage(reqVO); | |
| 148 | + // 断言 | |
| 149 | + assertEquals(1, pageResult.getTotal()); | |
| 150 | + assertEquals(1, pageResult.getList().size()); | |
| 151 | + assertPojoEquals(dbMailAccount, pageResult.getList().get(0)); | |
| 152 | + } | |
| 153 | + | |
| 154 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailLogServiceImplTest.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.map.MapUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailLogMapper; | |
| 12 | +import cn.iocoder.yudao.module.system.enums.mail.MailSendStatusEnum; | |
| 13 | +import org.junit.jupiter.api.Test; | |
| 14 | +import org.springframework.context.annotation.Import; | |
| 15 | + | |
| 16 | +import javax.annotation.Resource; | |
| 17 | +import java.util.Map; | |
| 18 | + | |
| 19 | +import static cn.hutool.core.util.RandomUtil.randomEle; | |
| 20 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | |
| 21 | +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; | |
| 22 | +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | |
| 23 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | |
| 24 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | |
| 25 | +import static org.junit.jupiter.api.Assertions.*; | |
| 26 | + | |
| 27 | +/** | |
| 28 | +* {@link MailLogServiceImpl} 的单元测试类 | |
| 29 | +* | |
| 30 | +* @author 芋道源码 | |
| 31 | +*/ | |
| 32 | +@Import(MailLogServiceImpl.class) | |
| 33 | +public class MailLogServiceImplTest extends BaseDbUnitTest { | |
| 34 | + | |
| 35 | + @Resource | |
| 36 | + private MailLogServiceImpl mailLogService; | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MailLogMapper mailLogMapper; | |
| 40 | + | |
| 41 | + @Test | |
| 42 | + public void testCreateMailLog() { | |
| 43 | + // 准备参数 | |
| 44 | + Long userId = randomLongId(); | |
| 45 | + Integer userType = randomEle(UserTypeEnum.values()).getValue(); | |
| 46 | + String toMail = randomEmail(); | |
| 47 | + MailAccountDO account = randomPojo(MailAccountDO.class); | |
| 48 | + MailTemplateDO template = randomPojo(MailTemplateDO.class); | |
| 49 | + String templateContent = randomString(); | |
| 50 | + Map<String, Object> templateParams = randomTemplateParams(); | |
| 51 | + Boolean isSend = true; | |
| 52 | + // mock 方法 | |
| 53 | + | |
| 54 | + // 调用 | |
| 55 | + Long logId = mailLogService.createMailLog(userId, userType, toMail, account, template, templateContent, templateParams, isSend); | |
| 56 | + // 断言 | |
| 57 | + MailLogDO log = mailLogMapper.selectById(logId); | |
| 58 | + assertNotNull(log); | |
| 59 | + assertEquals(MailSendStatusEnum.INIT.getStatus(), log.getSendStatus()); | |
| 60 | + assertEquals(userId, log.getUserId()); | |
| 61 | + assertEquals(userType, log.getUserType()); | |
| 62 | + assertEquals(toMail, log.getToMail()); | |
| 63 | + assertEquals(account.getId(), log.getAccountId()); | |
| 64 | + assertEquals(account.getMail(), log.getFromMail()); | |
| 65 | + assertEquals(template.getId(), log.getTemplateId()); | |
| 66 | + assertEquals(template.getCode(), log.getTemplateCode()); | |
| 67 | + assertEquals(template.getNickname(), log.getTemplateNickname()); | |
| 68 | + assertEquals(template.getTitle(), log.getTemplateTitle()); | |
| 69 | + assertEquals(templateContent, log.getTemplateContent()); | |
| 70 | + assertEquals(templateParams, log.getTemplateParams()); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @Test | |
| 74 | + public void testUpdateMailSendResult_success() { | |
| 75 | + // mock 数据 | |
| 76 | + MailLogDO log = randomPojo(MailLogDO.class, o -> { | |
| 77 | + o.setSendStatus(MailSendStatusEnum.INIT.getStatus()); | |
| 78 | + o.setSendTime(null).setSendMessageId(null).setSendException(null) | |
| 79 | + .setTemplateParams(randomTemplateParams()); | |
| 80 | + }); | |
| 81 | + mailLogMapper.insert(log); | |
| 82 | + // 准备参数 | |
| 83 | + Long logId = log.getId(); | |
| 84 | + String messageId = randomString(); | |
| 85 | + | |
| 86 | + // 调用 | |
| 87 | + mailLogService.updateMailSendResult(logId, messageId, null); | |
| 88 | + // 断言 | |
| 89 | + MailLogDO dbLog = mailLogMapper.selectById(logId); | |
| 90 | + assertEquals(MailSendStatusEnum.SUCCESS.getStatus(), dbLog.getSendStatus()); | |
| 91 | + assertNotNull(dbLog.getSendTime()); | |
| 92 | + assertEquals(messageId, dbLog.getSendMessageId()); | |
| 93 | + assertNull(dbLog.getSendException()); | |
| 94 | + } | |
| 95 | + | |
| 96 | + @Test | |
| 97 | + public void testUpdateMailSendResult_exception() { | |
| 98 | + // mock 数据 | |
| 99 | + MailLogDO log = randomPojo(MailLogDO.class, o -> { | |
| 100 | + o.setSendStatus(MailSendStatusEnum.INIT.getStatus()); | |
| 101 | + o.setSendTime(null).setSendMessageId(null).setSendException(null) | |
| 102 | + .setTemplateParams(randomTemplateParams()); | |
| 103 | + }); | |
| 104 | + mailLogMapper.insert(log); | |
| 105 | + // 准备参数 | |
| 106 | + Long logId = log.getId(); | |
| 107 | + Exception exception = new NullPointerException("测试异常"); | |
| 108 | + | |
| 109 | + // 调用 | |
| 110 | + mailLogService.updateMailSendResult(logId, null, exception); | |
| 111 | + // 断言 | |
| 112 | + MailLogDO dbLog = mailLogMapper.selectById(logId); | |
| 113 | + assertEquals(MailSendStatusEnum.FAILURE.getStatus(), dbLog.getSendStatus()); | |
| 114 | + assertNotNull(dbLog.getSendTime()); | |
| 115 | + assertNull(dbLog.getSendMessageId()); | |
| 116 | + assertEquals("NullPointerException: 测试异常", dbLog.getSendException()); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @Test | |
| 120 | + public void testGetMailLogPage() { | |
| 121 | + // mock 数据 | |
| 122 | + MailLogDO dbMailLog = randomPojo(MailLogDO.class, o -> { // 等会查询到 | |
| 123 | + o.setUserId(1L); | |
| 124 | + o.setUserType(UserTypeEnum.ADMIN.getValue()); | |
| 125 | + o.setToMail("768@qq.com"); | |
| 126 | + o.setAccountId(10L); | |
| 127 | + o.setTemplateId(100L); | |
| 128 | + o.setSendStatus(MailSendStatusEnum.INIT.getStatus()); | |
| 129 | + o.setSendTime(buildTime(2023, 2, 10)); | |
| 130 | + o.setTemplateParams(randomTemplateParams()); | |
| 131 | + }); | |
| 132 | + mailLogMapper.insert(dbMailLog); | |
| 133 | + // 测试 userId 不匹配 | |
| 134 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setUserId(2L))); | |
| 135 | + // 测试 userType 不匹配 | |
| 136 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setUserType(UserTypeEnum.MEMBER.getValue()))); | |
| 137 | + // 测试 toMail 不匹配 | |
| 138 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setToMail("788@.qq.com"))); | |
| 139 | + // 测试 accountId 不匹配 | |
| 140 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setAccountId(11L))); | |
| 141 | + // 测试 templateId 不匹配 | |
| 142 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setTemplateId(101L))); | |
| 143 | + // 测试 sendStatus 不匹配 | |
| 144 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setSendStatus(MailSendStatusEnum.SUCCESS.getStatus()))); | |
| 145 | + // 测试 sendTime 不匹配 | |
| 146 | + mailLogMapper.insert(cloneIgnoreId(dbMailLog, o -> o.setSendTime(buildTime(2023, 3, 10)))); | |
| 147 | + // 准备参数 | |
| 148 | + MailLogPageReqVO reqVO = new MailLogPageReqVO(); | |
| 149 | + reqVO.setUserId(1L); | |
| 150 | + reqVO.setUserType(UserTypeEnum.ADMIN.getValue()); | |
| 151 | + reqVO.setToMail("768"); | |
| 152 | + reqVO.setAccountId(10L); | |
| 153 | + reqVO.setTemplateId(100L); | |
| 154 | + reqVO.setSendStatus(MailSendStatusEnum.INIT.getStatus()); | |
| 155 | + reqVO.setSendTime((buildBetweenTime(2023, 2, 1, 2023, 2, 15))); | |
| 156 | + | |
| 157 | + // 调用 | |
| 158 | + PageResult<MailLogDO> pageResult = mailLogService.getMailLogPage(reqVO); | |
| 159 | + // 断言 | |
| 160 | + assertEquals(1, pageResult.getTotal()); | |
| 161 | + assertEquals(1, pageResult.getList().size()); | |
| 162 | + assertPojoEquals(dbMailLog, pageResult.getList().get(0)); | |
| 163 | + } | |
| 164 | + | |
| 165 | + private static Map<String, Object> randomTemplateParams() { | |
| 166 | + return MapUtil.<String, Object>builder().put(randomString(), randomString()) | |
| 167 | + .put(randomString(), randomString()).build(); | |
| 168 | + } | |
| 169 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImplTest.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.map.MapUtil; | |
| 4 | +import cn.hutool.extra.mail.MailAccount; | |
| 5 | +import cn.hutool.extra.mail.MailUtil; | |
| 6 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 7 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 8 | +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 11 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 12 | +import org.assertj.core.util.Lists; | |
| 13 | +import org.junit.jupiter.api.Disabled; | |
| 14 | +import org.junit.jupiter.api.Test; | |
| 15 | +import org.mockito.InjectMocks; | |
| 16 | +import org.mockito.Mock; | |
| 17 | + | |
| 18 | +import java.util.HashMap; | |
| 19 | +import java.util.Map; | |
| 20 | + | |
| 21 | +import static cn.hutool.core.util.RandomUtil.randomEle; | |
| 22 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | |
| 23 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | |
| 24 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; | |
| 25 | +import static org.junit.jupiter.api.Assertions.assertEquals; | |
| 26 | +import static org.mockito.ArgumentMatchers.eq; | |
| 27 | +import static org.mockito.Mockito.*; | |
| 28 | + | |
| 29 | +class MailSendServiceImplTest extends BaseMockitoUnitTest { | |
| 30 | + | |
| 31 | + @InjectMocks | |
| 32 | + private MailSendServiceImpl mailSendService; | |
| 33 | + | |
| 34 | + @Mock | |
| 35 | + private MailAccountService mailAccountService; | |
| 36 | + @Mock | |
| 37 | + private MailTemplateService mailTemplateService; | |
| 38 | + @Mock | |
| 39 | + private MailLogService mailLogService; | |
| 40 | + @Mock | |
| 41 | + private MailProducer mailProducer; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 用于快速测试你的邮箱账号是否正常 | |
| 45 | + */ | |
| 46 | + @Test | |
| 47 | + @Disabled | |
| 48 | + public void testDemo() { | |
| 49 | + MailAccount mailAccount = new MailAccount() | |
| 50 | +// .setFrom("奥特曼 <ydym_test@163.com>") | |
| 51 | + .setFrom("ydym_test@163.com") // 邮箱地址 | |
| 52 | + .setHost("smtp.163.com").setPort(465).setSslEnable(true) // SMTP 服务器 | |
| 53 | + .setAuth(true).setUser("ydym_test@163.com").setPass("WBZTEINMIFVRYSOE"); // 登录账号密码 | |
| 54 | + String messageId = MailUtil.send(mailAccount, "7685413@qq.com", "主题", "内容", false); | |
| 55 | + System.out.println("发送结果:" + messageId); | |
| 56 | + } | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 发送成功,当短信模板开启时 | |
| 60 | + */ | |
| 61 | + @Test | |
| 62 | + public void testSendSingleMail_successWhenMailTemplateEnable() { | |
| 63 | + // 准备参数 | |
| 64 | + String mail = randomEmail(); | |
| 65 | + Long userId = randomLongId(); | |
| 66 | + Integer userType = randomEle(UserTypeEnum.values()).getValue(); | |
| 67 | + String templateCode = randomString(); | |
| 68 | + Map<String, Object> templateParams = MapUtil.<String, Object>builder().put("code", "1234") | |
| 69 | + .put("op", "login").build(); | |
| 70 | + // mock MailTemplateService 的方法 | |
| 71 | + MailTemplateDO template = randomPojo(MailTemplateDO.class, o -> { | |
| 72 | + o.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 73 | + o.setContent("验证码为{code}, 操作为{op}"); | |
| 74 | + o.setParams(Lists.newArrayList("code", "op")); | |
| 75 | + }); | |
| 76 | + when(mailTemplateService.getMailTemplateByCodeFromCache(eq(templateCode))).thenReturn(template); | |
| 77 | + String content = randomString(); | |
| 78 | + when(mailTemplateService.formatMailTemplateContent(eq(template.getContent()), eq(templateParams))) | |
| 79 | + .thenReturn(content); | |
| 80 | + // mock MailAccountService 的方法 | |
| 81 | + MailAccountDO account = randomPojo(MailAccountDO.class); | |
| 82 | + when(mailAccountService.getMailAccountFromCache(eq(template.getAccountId()))).thenReturn(account); | |
| 83 | + // mock MailLogService 的方法 | |
| 84 | + Long mailLogId = randomLongId(); | |
| 85 | + when(mailLogService.createMailLog(eq(userId), eq(userType), eq(mail), | |
| 86 | + eq(account), eq(template), eq(content), eq(templateParams), eq(true))).thenReturn(mailLogId); | |
| 87 | + | |
| 88 | + // 调用 | |
| 89 | + Long resultMailLogId = mailSendService.sendSingleMail(mail, userId, userType, templateCode, templateParams); | |
| 90 | + // 断言 | |
| 91 | + assertEquals(mailLogId, resultMailLogId); | |
| 92 | + // 断言调用 | |
| 93 | + verify(mailProducer).sendMailSendMessage(eq(mailLogId), eq(mail), | |
| 94 | + eq(account.getId()), eq(template.getNickname()), eq(template.getTitle()), eq(content)); | |
| 95 | + } | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 发送成功,当短信模板关闭时 | |
| 99 | + */ | |
| 100 | + @Test | |
| 101 | + public void testSendSingleMail_successWhenSmsTemplateDisable() { | |
| 102 | + // 准备参数 | |
| 103 | + String mail = randomEmail(); | |
| 104 | + Long userId = randomLongId(); | |
| 105 | + Integer userType = randomEle(UserTypeEnum.values()).getValue(); | |
| 106 | + String templateCode = randomString(); | |
| 107 | + Map<String, Object> templateParams = MapUtil.<String, Object>builder().put("code", "1234") | |
| 108 | + .put("op", "login").build(); | |
| 109 | + // mock MailTemplateService 的方法 | |
| 110 | + MailTemplateDO template = randomPojo(MailTemplateDO.class, o -> { | |
| 111 | + o.setStatus(CommonStatusEnum.DISABLE.getStatus()); | |
| 112 | + o.setContent("验证码为{code}, 操作为{op}"); | |
| 113 | + o.setParams(Lists.newArrayList("code", "op")); | |
| 114 | + }); | |
| 115 | + when(mailTemplateService.getMailTemplateByCodeFromCache(eq(templateCode))).thenReturn(template); | |
| 116 | + String content = randomString(); | |
| 117 | + when(mailTemplateService.formatMailTemplateContent(eq(template.getContent()), eq(templateParams))) | |
| 118 | + .thenReturn(content); | |
| 119 | + // mock MailAccountService 的方法 | |
| 120 | + MailAccountDO account = randomPojo(MailAccountDO.class); | |
| 121 | + when(mailAccountService.getMailAccountFromCache(eq(template.getAccountId()))).thenReturn(account); | |
| 122 | + // mock MailLogService 的方法 | |
| 123 | + Long mailLogId = randomLongId(); | |
| 124 | + when(mailLogService.createMailLog(eq(userId), eq(userType), eq(mail), | |
| 125 | + eq(account), eq(template), eq(content), eq(templateParams), eq(false))).thenReturn(mailLogId); | |
| 126 | + | |
| 127 | + // 调用 | |
| 128 | + Long resultMailLogId = mailSendService.sendSingleMail(mail, userId, userType, templateCode, templateParams); | |
| 129 | + // 断言 | |
| 130 | + assertEquals(mailLogId, resultMailLogId); | |
| 131 | + // 断言调用 | |
| 132 | + verify(mailProducer, times(0)).sendMailSendMessage(anyLong(), anyString(), | |
| 133 | + anyLong(), anyString(), anyString(), anyString()); | |
| 134 | + } | |
| 135 | + | |
| 136 | + @Test | |
| 137 | + public void testCheckMailTemplateValid_notExists() { | |
| 138 | + // 准备参数 | |
| 139 | + String templateCode = randomString(); | |
| 140 | + // mock 方法 | |
| 141 | + | |
| 142 | + // 调用,并断言异常 | |
| 143 | + assertServiceException(() -> mailSendService.checkMailTemplateValid(templateCode), | |
| 144 | + MAIL_TEMPLATE_NOT_EXISTS); | |
| 145 | + } | |
| 146 | + | |
| 147 | + @Test | |
| 148 | + public void testCheckTemplateParams_paramMiss() { | |
| 149 | + // 准备参数 | |
| 150 | + MailTemplateDO template = randomPojo(MailTemplateDO.class, | |
| 151 | + o -> o.setParams(Lists.newArrayList("code"))); | |
| 152 | + Map<String, Object> templateParams = new HashMap<>(); | |
| 153 | + // mock 方法 | |
| 154 | + | |
| 155 | + // 调用,并断言异常 | |
| 156 | + assertServiceException(() -> mailSendService.checkTemplateParams(template, templateParams), | |
| 157 | + MAIL_SEND_TEMPLATE_PARAM_MISS, "code"); | |
| 158 | + } | |
| 159 | + | |
| 160 | + @Test | |
| 161 | + public void testCheckMail_notExists() { | |
| 162 | + // 准备参数 | |
| 163 | + // mock 方法 | |
| 164 | + | |
| 165 | + // 调用,并断言异常 | |
| 166 | + assertServiceException(() -> mailSendService.checkMail(null), | |
| 167 | + MAIL_SEND_MAIL_NOT_EXISTS); | |
| 168 | + } | |
| 169 | + | |
| 170 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImplTest.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateCreateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateUpdateReqVO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; | |
| 10 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; | |
| 11 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.MailTemplateMapper; | |
| 12 | +import cn.iocoder.yudao.module.system.mq.producer.mail.MailProducer; | |
| 13 | +import org.junit.jupiter.api.Test; | |
| 14 | +import org.springframework.boot.test.mock.mockito.MockBean; | |
| 15 | +import org.springframework.context.annotation.Import; | |
| 16 | + | |
| 17 | +import javax.annotation.Resource; | |
| 18 | + | |
| 19 | +import java.util.Map; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; | |
| 22 | +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; | |
| 23 | +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | |
| 24 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | |
| 25 | +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | |
| 26 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; | |
| 27 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | |
| 28 | +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.MAIL_TEMPLATE_NOT_EXISTS; | |
| 29 | +import static org.junit.jupiter.api.Assertions.*; | |
| 30 | + | |
| 31 | +/** | |
| 32 | +* {@link MailTemplateServiceImpl} 的单元测试类 | |
| 33 | +* | |
| 34 | +* @author 芋道源码 | |
| 35 | +*/ | |
| 36 | +@Import(MailTemplateServiceImpl.class) | |
| 37 | +public class MailTemplateServiceImplTest extends BaseDbUnitTest { | |
| 38 | + | |
| 39 | + @Resource | |
| 40 | + private MailTemplateServiceImpl mailTemplateService; | |
| 41 | + | |
| 42 | + @Resource | |
| 43 | + private MailTemplateMapper mailTemplateMapper; | |
| 44 | + | |
| 45 | + @MockBean | |
| 46 | + private MailProducer mailProducer; | |
| 47 | + | |
| 48 | + @Test | |
| 49 | + public void testInitLocalCache() { | |
| 50 | + MailTemplateDO templateDO01 = randomPojo(MailTemplateDO.class); | |
| 51 | + mailTemplateMapper.insert(templateDO01); | |
| 52 | + MailTemplateDO templateDO02 = randomPojo(MailTemplateDO.class); | |
| 53 | + mailTemplateMapper.insert(templateDO02); | |
| 54 | + | |
| 55 | + // 调用 | |
| 56 | + mailTemplateService.initLocalCache(); | |
| 57 | + // 断言 mailTemplateCache 缓存 | |
| 58 | + Map<String, MailTemplateDO> mailTemplateCache = mailTemplateService.getMailTemplateCache(); | |
| 59 | + assertPojoEquals(templateDO01, mailTemplateCache.get(templateDO01.getCode())); | |
| 60 | + assertPojoEquals(templateDO02, mailTemplateCache.get(templateDO02.getCode())); | |
| 61 | + } | |
| 62 | + | |
| 63 | + @Test | |
| 64 | + public void testCreateMailTemplate_success() { | |
| 65 | + // 准备参数 | |
| 66 | + MailTemplateCreateReqVO reqVO = randomPojo(MailTemplateCreateReqVO.class); | |
| 67 | + | |
| 68 | + // 调用 | |
| 69 | + Long mailTemplateId = mailTemplateService.createMailTemplate(reqVO); | |
| 70 | + // 断言 | |
| 71 | + assertNotNull(mailTemplateId); | |
| 72 | + // 校验记录的属性是否正确 | |
| 73 | + MailTemplateDO mailTemplate = mailTemplateMapper.selectById(mailTemplateId); | |
| 74 | + assertPojoEquals(reqVO, mailTemplate); | |
| 75 | + } | |
| 76 | + | |
| 77 | + @Test | |
| 78 | + public void testUpdateMailTemplate_success() { | |
| 79 | + // mock 数据 | |
| 80 | + MailTemplateDO dbMailTemplate = randomPojo(MailTemplateDO.class); | |
| 81 | + mailTemplateMapper.insert(dbMailTemplate);// @Sql: 先插入出一条存在的数据 | |
| 82 | + // 准备参数 | |
| 83 | + MailTemplateUpdateReqVO reqVO = randomPojo(MailTemplateUpdateReqVO.class, o -> { | |
| 84 | + o.setId(dbMailTemplate.getId()); // 设置更新的 ID | |
| 85 | + }); | |
| 86 | + | |
| 87 | + // 调用 | |
| 88 | + mailTemplateService.updateMailTemplate(reqVO); | |
| 89 | + // 校验是否更新正确 | |
| 90 | + MailTemplateDO mailTemplate = mailTemplateMapper.selectById(reqVO.getId()); // 获取最新的 | |
| 91 | + assertPojoEquals(reqVO, mailTemplate); | |
| 92 | + } | |
| 93 | + | |
| 94 | + @Test | |
| 95 | + public void testUpdateMailTemplate_notExists() { | |
| 96 | + // 准备参数 | |
| 97 | + MailTemplateUpdateReqVO reqVO = randomPojo(MailTemplateUpdateReqVO.class); | |
| 98 | + | |
| 99 | + // 调用, 并断言异常 | |
| 100 | + assertServiceException(() -> mailTemplateService.updateMailTemplate(reqVO), MAIL_TEMPLATE_NOT_EXISTS); | |
| 101 | + } | |
| 102 | + | |
| 103 | + @Test | |
| 104 | + public void testDeleteMailTemplate_success() { | |
| 105 | + // mock 数据 | |
| 106 | + MailTemplateDO dbMailTemplate = randomPojo(MailTemplateDO.class); | |
| 107 | + mailTemplateMapper.insert(dbMailTemplate);// @Sql: 先插入出一条存在的数据 | |
| 108 | + // 准备参数 | |
| 109 | + Long id = dbMailTemplate.getId(); | |
| 110 | + | |
| 111 | + // 调用 | |
| 112 | + mailTemplateService.deleteMailTemplate(id); | |
| 113 | + // 校验数据不存在了 | |
| 114 | + assertNull(mailTemplateMapper.selectById(id)); | |
| 115 | + } | |
| 116 | + | |
| 117 | + @Test | |
| 118 | + public void testDeleteMailTemplate_notExists() { | |
| 119 | + // 准备参数 | |
| 120 | + Long id = randomLongId(); | |
| 121 | + | |
| 122 | + // 调用, 并断言异常 | |
| 123 | + assertServiceException(() -> mailTemplateService.deleteMailTemplate(id), MAIL_TEMPLATE_NOT_EXISTS); | |
| 124 | + } | |
| 125 | + | |
| 126 | + @Test | |
| 127 | + public void testGetMailTemplatePage() { | |
| 128 | + // mock 数据 | |
| 129 | + MailTemplateDO dbMailTemplate = randomPojo(MailTemplateDO.class, o -> { // 等会查询到 | |
| 130 | + o.setName("源码"); | |
| 131 | + o.setCode("test_01"); | |
| 132 | + o.setAccountId(1L); | |
| 133 | + o.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 134 | + o.setCreateTime(buildTime(2023, 2, 3)); | |
| 135 | + }); | |
| 136 | + mailTemplateMapper.insert(dbMailTemplate); | |
| 137 | + // 测试 name 不匹配 | |
| 138 | + mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setName("芋道"))); | |
| 139 | + // 测试 code 不匹配 | |
| 140 | + mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setCode("test_02"))); | |
| 141 | + // 测试 accountId 不匹配 | |
| 142 | + mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setAccountId(2L))); | |
| 143 | + // 测试 status 不匹配 | |
| 144 | + mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); | |
| 145 | + // 测试 createTime 不匹配 | |
| 146 | + mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setCreateTime(buildTime(2023, 1, 5)))); | |
| 147 | + // 准备参数 | |
| 148 | + MailTemplatePageReqVO reqVO = new MailTemplatePageReqVO(); | |
| 149 | + reqVO.setName("源"); | |
| 150 | + reqVO.setCode("est_01"); | |
| 151 | + reqVO.setAccountId(1L); | |
| 152 | + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 153 | + reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 5)); | |
| 154 | + | |
| 155 | + // 调用 | |
| 156 | + PageResult<MailTemplateDO> pageResult = mailTemplateService.getMailTemplatePage(reqVO); | |
| 157 | + // 断言 | |
| 158 | + assertEquals(1, pageResult.getTotal()); | |
| 159 | + assertEquals(1, pageResult.getList().size()); | |
| 160 | + assertPojoEquals(dbMailTemplate, pageResult.getList().get(0)); | |
| 161 | + } | |
| 162 | + | |
| 163 | +} | ... | ... |