diff --git a/README.md b/README.md
index 4af0325c5c560dffdca62b229a14c283d97dbeb8..000a3e50084e50f4ef3a33d7b56f6da885d2784e 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# Bootx-Platform (v1.1.3)
+# Bootx-Platform (v1.1.4)
-
+
@@ -14,12 +14,12 @@
基于Spring Boot框架打造,针对单体式应用进行专门设计,提供整套服务模块,努力为打造全方位企业级开发解决方案,
致力将开源版打造成超越商业版后台管理框架的项目。前端分为vue2版和vue3版,vue2使用 [ANTD PRO VUE](https://pro.antdv.com/) 作为脚手架,vue3使用 [Vben-Admin-Next](https://vvbin.cn/doc-next/) 作为脚手架。
-移动端使用 [taro](https://taro.jd.com/) vue3+TS为技术栈。
+移动端使用 [Taro](https://taro.jd.com/) vue3+TS为技术栈。
## 🍒文档
- 系统演示地址:[管理平台(vue2)](http://web.platform.bootx.cn/)
-- 前端项目地址:[前端项目(vue2)](https://gitee.com/bootx/bootx-platform-ui)
+- 前端项目地址:[前端项目(vue2)](https://gitee.com/bootx/bootx-platform-ui) [前端项目(vue3开发中)](https://gitee.com/bootx/bootx-platfrom-vue3)
- 移动端项目地址:[移动端项目(taro+vue3+ts)](https://gitee.com/xucun/bootx-platform-mobile)
- 日志收集:[ELK](http://elk.dev.bootx.cn:5601/app/discove) [PlumeLog](http://platform.dev.bootx.cn:8080/plumelog/#/)
- 项目文档:[项目使用指南文档](https://www.yuque.com/bootx/bootx-platform/)
@@ -54,12 +54,12 @@
- [x] 更灵活的节点用户配置,可配置发起人、指定用户、指定角色等
- [x] 会签处理
- [x] 串签处理
- - [ ] 或签处理
- - [ ] 会签比例通过处理
- - [ ] 驳回处理
+ - [x] 或签处理
+ - [x] 会签比例通过处理
+ - [x] 驳回处理
- [ ] 任意节点退回
- [ ] 关联消息通知
- - [ ] 更方便与现有业务整合
+ - [x] 更方便与现有业务整合
- 移动端脚手架【taro TS+Vue3】 10 月
- [x] 扩展新登录方式和管理策略
diff --git a/_config/sql/1.1.3/1.1.3_up_1.1.4.sql b/_config/sql/1.1.3/1.1.3_up_1.1.4.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2a24619809a918cb74e3f2e33d8705105661effd
--- /dev/null
+++ b/_config/sql/1.1.3/1.1.3_up_1.1.4.sql
@@ -0,0 +1,43 @@
+SET FOREIGN_KEY_CHECKS=0;
+
+CREATE TABLE `base_dynamic_data_source` (
+ `id` bigint(20) NOT NULL,
+ `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源编码',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源名称',
+ `database_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库类型',
+ `db_driver` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '驱动类',
+ `db_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库地址',
+ `db_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库名称',
+ `db_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户名',
+ `db_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '版本',
+ `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '动态数据源管理' ROW_FORMAT = Dynamic;
+
+
+
+INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1);
+
+INSERT INTO `iam_perm_menu` VALUES (1573669546890297344, 'admin', 1552207982510706688, '动态数据源', 'DynamicSource', NULL, b'0', '', b'0', b'0', 'develop/dynamicsource/DynamicDataSourceList', NULL, '/develop/source', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-24 21:43:52', 1399985191002447872, '2022-09-24 21:43:52', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573951326893510656, 'BpmTaskCreated', '流程任务创建事件', '流程任务创建事件', 0, '', 1399985191002447872, '2022-09-25 16:23:34', 1399985191002447872, '2022-09-25 16:23:34', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573951515616219136, 'BpmTaskAssignCreated', '流程任务更改处理人事件(新处理人)', '流程任务更改处理人事件(新处理人)', 0, '', 1399985191002447872, '2022-09-25 16:24:19', 1399985191002447872, '2022-09-25 16:27:09', 1, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573952505056727040, 'BpmTaskAssignCancel', '流程任务更改处理人事件(原处理人)', '流程任务更改处理人事件(原处理人)', 0, '', 1399985191002447872, '2022-09-25 16:28:14', 1399985191002447872, '2022-09-25 16:28:14', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573952568654958592, 'BpmTaskCancel', '流程任务取消事件', '流程任务取消事件', 0, '', 1399985191002447872, '2022-09-25 16:28:30', 1399985191002447872, '2022-09-25 16:28:30', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573952621826150400, 'BpmTaskReject', '流程任务驳回事件', '流程任务驳回事件', 0, '', 1399985191002447872, '2022-09-25 16:28:42', 1399985191002447872, '2022-09-25 16:28:42', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573952709432578048, 'BpmInstanceCompleted', '流程完成时通知发起人', '流程完成时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:03', 1399985191002447872, '2022-09-25 16:29:03', 0, 0);
+
+INSERT INTO `notice_message_template` VALUES (1573952762507300864, 'BpmInstanceCancel', '流程取消时通知发起人', '流程取消时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:16', 1399985191002447872, '2022-09-25 16:29:16', 0, 0);
+
+SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
diff --git a/_config/sql/bootx-platform.sql b/_config/sql/bootx-platform.sql
index 97ce9d57e57f2f196e5862ad9b23a4b5b017f45f..c5222c4f8dce363a43a0ca15a65b30404fb26e18 100644
--- a/_config/sql/bootx-platform.sql
+++ b/_config/sql/bootx-platform.sql
@@ -216,6 +216,34 @@ INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, '
INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0);
INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0);
INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0);
+INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1);
+
+
+-- ----------------------------
+-- Table structure for base_dynamic_data_source
+-- ----------------------------
+CREATE TABLE `base_dynamic_data_source` (
+ `id` bigint(20) NOT NULL,
+ `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源编码',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源名称',
+ `database_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库类型',
+ `db_driver` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '驱动类',
+ `db_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库地址',
+ `db_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库名称',
+ `db_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户名',
+ `db_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '版本',
+ `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '动态数据源管理' ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of base_dynamic_data_source
+-- ----------------------------
-- ----------------------------
-- Table structure for base_dynamic_form
@@ -1182,6 +1210,7 @@ INSERT INTO `iam_perm_menu` VALUES (1564626025579462656, 'admin', 15377324406325
INSERT INTO `iam_perm_menu` VALUES (1571023702122766336, 'admin', 1562460770753544192, '未处理任务', 'BpmTodoTask', NULL, b'0', '', b'0', b'0', 'bpm/task/TodoTaskList', NULL, '/bpm/todo', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:30:13', 1399985191002447872, '2022-09-17 14:31:23', 2, 0);
INSERT INTO `iam_perm_menu` VALUES (1571023925834358784, 'admin', 1562460770753544192, '已处理任务', 'BpmDoneTask', NULL, b'0', '', b'0', b'0', 'bpm/task/DoneTaskList', NULL, '/bpm/done', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:31:07', 1399985191002447872, '2022-09-17 14:31:07', 0, 0);
INSERT INTO `iam_perm_menu` VALUES (1571024250171498496, 'admin', 1562460770753544192, '流程实例', 'BpmInstance', NULL, b'0', '', b'0', b'0', 'bpm/instance/InstanceList', NULL, '/bpm/instance', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:32:24', 1399985191002447872, '2022-09-17 14:32:24', 0, 0);
+INSERT INTO `iam_perm_menu` VALUES (1573669546890297344, 'admin', 1552207982510706688, '动态数据源', 'DynamicSource', NULL, b'0', '', b'0', b'0', 'develop/dynamicsource/DynamicDataSourceList', NULL, '/develop/source', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-24 21:43:52', 1399985191002447872, '2022-09-24 21:43:52', 0, 0);
-- ----------------------------
-- Table structure for iam_perm_path
@@ -1501,6 +1530,13 @@ CREATE TABLE `notice_message_template` (
-- Records of notice_message_template
-- ----------------------------
INSERT INTO `notice_message_template` VALUES (1424936204932169730, 'cs', '测试', 'hello ${msg}6666666666666666666666666666', 1, '测试模板', 0, '2021-08-10 11:30:40', 0, '2021-08-10 11:30:40', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573951326893510656, 'BpmTaskCreated', '流程任务创建事件', '流程任务创建事件', 0, '', 1399985191002447872, '2022-09-25 16:23:34', 1399985191002447872, '2022-09-25 16:23:34', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573951515616219136, 'BpmTaskAssignCreated', '流程任务更改处理人事件(新处理人)', '流程任务更改处理人事件(新处理人)', 0, '', 1399985191002447872, '2022-09-25 16:24:19', 1399985191002447872, '2022-09-25 16:27:09', 1, 0);
+INSERT INTO `notice_message_template` VALUES (1573952505056727040, 'BpmTaskAssignCancel', '流程任务更改处理人事件(原处理人)', '流程任务更改处理人事件(原处理人)', 0, '', 1399985191002447872, '2022-09-25 16:28:14', 1399985191002447872, '2022-09-25 16:28:14', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952568654958592, 'BpmTaskCancel', '流程任务取消事件', '流程任务取消事件', 0, '', 1399985191002447872, '2022-09-25 16:28:30', 1399985191002447872, '2022-09-25 16:28:30', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952621826150400, 'BpmTaskReject', '流程任务驳回事件', '流程任务驳回事件', 0, '', 1399985191002447872, '2022-09-25 16:28:42', 1399985191002447872, '2022-09-25 16:28:42', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952709432578048, 'BpmInstanceCompleted', '流程完成时通知发起人', '流程完成时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:03', 1399985191002447872, '2022-09-25 16:29:03', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952762507300864, 'BpmInstanceCancel', '流程取消时通知发起人', '流程取消时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:16', 1399985191002447872, '2022-09-25 16:29:16', 0, 0);
-- ----------------------------
-- Table structure for notice_site_message
diff --git a/_doc/ChangeLog.md b/_doc/ChangeLog.md
index edb2ab483df9169191aabee7cfe9111c7177521d..c783b276abdae84e3bd3d09a336c613a414ec897 100644
--- a/_doc/ChangeLog.md
+++ b/_doc/ChangeLog.md
@@ -1,4 +1,11 @@
# CHANGELOG
+## [v1.1.4] 一号线-工研院
+- 增加工作流任务的关联信息通知
+- 增加多数据源管理
+- Vue3版本前端项目搭建
+- Spring Cloud版本重启
+- Spring 版本升级
+- 优化代码生成器模板
## [v1.1.3] 一号线-工研院
- 增加流程驳回处理,支持普通任务和多实例的驳回
- 增加流程事件的暴露,方式对接业务和消息通知
diff --git a/_license/LICENSE.md b/_license/LICENSE.md
index ae20a703a0054f5f0942957f3bd2a5e8fd3390f4..7c3b7e2af6fa0197ea7f044392b558c0c4f1a347 100644
--- a/_license/LICENSE.md
+++ b/_license/LICENSE.md
@@ -25,4 +25,7 @@ flowable antd vue 的工作流设计器:
https://gitee.com/Vincent-Vic/workflow-bpmn-modeler-antdv
flowable 工作流相关思路和实现 乐之终曲:
-https://blog.csdn.net/qq_37143673
\ No newline at end of file
+https://blog.csdn.net/qq_37143673
+
+GoView 一个Vue3搭建的低代码数据可视化开发平台:
+https://gitee.com/dromara/go-view
\ No newline at end of file
diff --git a/_license/go-view/LICENSE b/_license/go-view/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a44f18f96c6b3b5fae582fcbfafe56dd03c416e9
--- /dev/null
+++ b/_license/go-view/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-present GoView
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/bootx-common-core/pom.xml b/bootx-common-core/pom.xml
index 8d7b8fe4cec7b3f5fd5a50e26ce9b769b8e5a557..2f1c5bd1db228a51b540ab5d54104a3bf65e87fa 100644
--- a/bootx-common-core/pom.xml
+++ b/bootx-common-core/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-audit-log/pom.xml b/bootx-common-starters/common-starter-audit-log/pom.xml
index 54835bfafda61f6116ee51237c78023ea0a8eabb..e5a8bf30d170b06476874cea3403ec565e380d3f 100644
--- a/bootx-common-starters/common-starter-audit-log/pom.xml
+++ b/bootx-common-starters/common-starter-audit-log/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-auth/pom.xml b/bootx-common-starters/common-starter-auth/pom.xml
index 1b87a8647bacbf300d3e0ab88fd5867929e135e1..b780e881b79faf0dd5209b44ce86909bc8df541b 100644
--- a/bootx-common-starters/common-starter-auth/pom.xml
+++ b/bootx-common-starters/common-starter-auth/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.1.3
+ 1.1.4
4.0.0
common-starter-auth
diff --git a/bootx-common-starters/common-starter-code-gen/pom.xml b/bootx-common-starters/common-starter-code-gen/pom.xml
index a6182f82c81f12b5c5aa4047c45b092649a0cbcb..1820f964f6b0dcd0f8bf5ac89f662af303e25845 100644
--- a/bootx-common-starters/common-starter-code-gen/pom.xml
+++ b/bootx-common-starters/common-starter-code-gen/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm b/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
index 032cfc1fa212f06b3dbbe88140d18f74227c9ba7..370da787747106a449d8606bf3c8d79ebe119587 100644
--- a/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
+++ b/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
@@ -1,17 +1,12 @@
-
-
-
-
-
- 查询
- 重置
-
-
-
-
-
+ queryParam = {}"
+ />
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-dingtalk/pom.xml b/bootx-common-starters/common-starter-dingtalk/pom.xml
index b32d0fb9b239a77e819c9e0700559ba455ab8f34..c49adfc3e7c76523e266fd9484bd108583e0bfad 100644
--- a/bootx-common-starters/common-starter-dingtalk/pom.xml
+++ b/bootx-common-starters/common-starter-dingtalk/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-file/pom.xml b/bootx-common-starters/common-starter-file/pom.xml
index 021c7ca1af70475171e29d4c58638d4d6ffb647d..35d5f55cf34484cbfc666729f46a3ff7fee9ba55 100644
--- a/bootx-common-starters/common-starter-file/pom.xml
+++ b/bootx-common-starters/common-starter-file/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-flowable/pom.xml b/bootx-common-starters/common-starter-flowable/pom.xml
index c307abc606af1528bf77e47f9baa51ee6ecfa315..97e98793ac204b199526468d40a56ddeaccfda15 100644
--- a/bootx-common-starters/common-starter-flowable/pom.xml
+++ b/bootx-common-starters/common-starter-flowable/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskOperateService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskOperateService.java
index 3818ae869133ea692e81dcab9e3f34952834dc0c..37e80987fe637b62597b5e01f9d7af8d9d4705d2 100644
--- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskOperateService.java
+++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskOperateService.java
@@ -187,6 +187,6 @@ public class BpmTaskOperateService {
* 重新分配人员
*/
public void assignee(String taskId, Long userId){
- taskService.setOwner(taskId, String.valueOf(userId));
+ taskService.setAssignee(taskId, String.valueOf(userId));
}
}
diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/BpmEventService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/BpmEventService.java
index ce4aaee0006885b11ac7ede850c448318e229555..fc6bde57fbe531c9e0eb00436786f3905d1702d4 100644
--- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/BpmEventService.java
+++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/BpmEventService.java
@@ -75,9 +75,9 @@ public class BpmEventService {
/**
* 任务完成事件
*/
- public void taskCompleted(List tasks){
+ public void taskCompleted(List tasks,boolean multi){
this.afterCommit(() -> {
- eventPublisher.publishEvent(new TaskCompletedEvent(this,tasks));
+ eventPublisher.publishEvent(new TaskCompletedEvent(this,tasks, multi));
});
}
diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/TaskCompletedEvent.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/TaskCompletedEvent.java
index 89b42af2a032c5b91a78a5c87e64a8cc6a18f6b5..00786c659c6300f1d26e667d2a3b747c58d4b0c2 100644
--- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/TaskCompletedEvent.java
+++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/event/TaskCompletedEvent.java
@@ -14,9 +14,11 @@ import java.util.List;
@Getter
public class TaskCompletedEvent extends ApplicationEvent {
private final List bpmTasks;
+ private final boolean multi;
- public TaskCompletedEvent(Object source, List bpmTasks) {
+ public TaskCompletedEvent(Object source, List bpmTasks, boolean multi) {
super(source);
this.bpmTasks = bpmTasks;
+ this.multi = multi;
}
}
diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/handler/service/BpmTaskEventListenerService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/handler/service/BpmTaskEventListenerService.java
index 2780c6ef23c29fb7efaf2a80329e46516029c2f3..359e0151e918c637a4be8397bf326473468518ac 100644
--- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/handler/service/BpmTaskEventListenerService.java
+++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/handler/service/BpmTaskEventListenerService.java
@@ -105,7 +105,7 @@ public class BpmTaskEventListenerService {
.setReason(bpmContext.getTaskReason())
.setFormVariables(bpmContext.getFormVariables());
bpmTaskManager.updateById(bpmTask);
- eventService.taskCompleted(Collections.singletonList(bpmTask));
+ eventService.taskCompleted(Collections.singletonList(bpmTask),false);
});
}
@@ -167,6 +167,6 @@ public class BpmTaskEventListenerService {
.setState(STATE_PASS))
.collect(Collectors.toList());
bpmTaskManager.updateAllById(updateTasks);
- eventService.taskCompleted(updateTasks);
+ eventService.taskCompleted(updateTasks,true);
}
}
diff --git a/bootx-common-starters/common-starter-monitor/pom.xml b/bootx-common-starters/common-starter-monitor/pom.xml
index 243044fe8cfb5937e1152550e3f6c0f282b3f333..43e06abc6a032e667179b560952f33751e35750c 100644
--- a/bootx-common-starters/common-starter-monitor/pom.xml
+++ b/bootx-common-starters/common-starter-monitor/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
jar
diff --git a/bootx-common-starters/common-starter-quartz/pom.xml b/bootx-common-starters/common-starter-quartz/pom.xml
index 35d2d3cbd8913a775bca5cef1a5c02eaee2bede2..92c030ebe1d70e30ff1c1dab743d81df0e56a386 100644
--- a/bootx-common-starters/common-starter-quartz/pom.xml
+++ b/bootx-common-starters/common-starter-quartz/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-wechat/pom.xml b/bootx-common-starters/common-starter-wechat/pom.xml
index 72bb070f08e122c98294ed5b757c13e7b5575436..994df59f828a56b911dfcbd204b98b8afea1370c 100644
--- a/bootx-common-starters/common-starter-wechat/pom.xml
+++ b/bootx-common-starters/common-starter-wechat/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-common-starters/common-starter-wecom/pom.xml b/bootx-common-starters/common-starter-wecom/pom.xml
index 004bbdf444d4c7b7fa478b8b5b78e32e7a5eccd3..142bdba5afa8f1c30b62aa0753f579e5776f9363 100644
--- a/bootx-common-starters/common-starter-wecom/pom.xml
+++ b/bootx-common-starters/common-starter-wecom/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.1.3
+ 1.1.4
4.0.0
jar
diff --git a/bootx-common-starters/pom.xml b/bootx-common-starters/pom.xml
index d5f81b1cdb62fe24dec999125b0781d6d6d8bb49..cc6ea3e009cf59fdda7e362d6b09d0cd527a0fca 100644
--- a/bootx-common-starters/pom.xml
+++ b/bootx-common-starters/pom.xml
@@ -5,7 +5,7 @@
bootx-platform
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-cache/pom.xml b/bootx-commons/common-cache/pom.xml
index 2e684794c90ad17ab573ca7fbbad2202734b003f..dd05668cf4753480a567416e994fe6ff93a59f3e 100644
--- a/bootx-commons/common-cache/pom.xml
+++ b/bootx-commons/common-cache/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-exception-handler/pom.xml b/bootx-commons/common-exception-handler/pom.xml
index 34c10060422aa8d7e3bdba479bc82cc7ab58106f..45c58119d46fc671e47a338fa8c8da89f10f77e9 100644
--- a/bootx-commons/common-exception-handler/pom.xml
+++ b/bootx-commons/common-exception-handler/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
common-exception-handler
diff --git a/bootx-commons/common-header-holder/pom.xml b/bootx-commons/common-header-holder/pom.xml
index c614c249a83bd31478a5bab1e00895699f4fe15a..84d207270a26b1ad6f41cc53da675e86c7938ca5 100644
--- a/bootx-commons/common-header-holder/pom.xml
+++ b/bootx-commons/common-header-holder/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-idempotency/pom.xml b/bootx-commons/common-idempotency/pom.xml
index 05f1710d99be8bf8b4de6af449dca8cef365768f..3f4abcc14656282a8d84a4c247899eaa4fd985c9 100644
--- a/bootx-commons/common-idempotency/pom.xml
+++ b/bootx-commons/common-idempotency/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-jackson/pom.xml b/bootx-commons/common-jackson/pom.xml
index c64cc1714960b9c5b2eff738d707697c0dcf8263..6f203b30ca1b21190e12bd1c757ec9f3ae9062ba 100644
--- a/bootx-commons/common-jackson/pom.xml
+++ b/bootx-commons/common-jackson/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-lock/pom.xml b/bootx-commons/common-lock/pom.xml
index 15352c4cdb77688fc4035698d2db148fd3f21d74..1c64f99d0b5cdd03c5a0a20ede5471bf596b2cfc 100644
--- a/bootx-commons/common-lock/pom.xml
+++ b/bootx-commons/common-lock/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-log/pom.xml b/bootx-commons/common-log/pom.xml
index 724a025477fc9e8494bf1c75593b27fa7acce640..cec74d064a4498043a6d33da03ab273982483561 100644
--- a/bootx-commons/common-log/pom.xml
+++ b/bootx-commons/common-log/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-mongo/pom.xml b/bootx-commons/common-mongo/pom.xml
index ce777f26a87b373a20ebb6f4192eb83b48dcc83e..cd603b2bcbefeaa9c8a232f207947f3550a878f8 100644
--- a/bootx-commons/common-mongo/pom.xml
+++ b/bootx-commons/common-mongo/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.1.3
+ 1.1.4
4.0.0
common-mongo
diff --git a/bootx-commons/common-mqtt/pom.xml b/bootx-commons/common-mqtt/pom.xml
index 22882bb9eefb232824c007e6157a43e64f63f5f1..73d462d3fa14f44992e41839465de844f3d3552f 100644
--- a/bootx-commons/common-mqtt/pom.xml
+++ b/bootx-commons/common-mqtt/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-mybatis-plus/pom.xml b/bootx-commons/common-mybatis-plus/pom.xml
index 2d60beb1188fb92dd90e7f658b8af3c0483f62b9..6fbd8c72ef82fa5ae98ea0bdf38d90ab74c4c48c 100644
--- a/bootx-commons/common-mybatis-plus/pom.xml
+++ b/bootx-commons/common-mybatis-plus/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-rabbitmq/pom.xml b/bootx-commons/common-rabbitmq/pom.xml
index 01533fd7d1d44269fc293b4962bd47a4f5bf7dd6..5705514b4ff5aadd324b3fbaeb50546d6759d0d7 100644
--- a/bootx-commons/common-rabbitmq/pom.xml
+++ b/bootx-commons/common-rabbitmq/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-redis-client/pom.xml b/bootx-commons/common-redis-client/pom.xml
index 8ff7157c454cc2809cc65b18cd549bbbc72d3f78..e12a3445664b4911aaabea2b1f36fc5be6163460 100644
--- a/bootx-commons/common-redis-client/pom.xml
+++ b/bootx-commons/common-redis-client/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-sequence/pom.xml b/bootx-commons/common-sequence/pom.xml
index ff301e26ac63121df214905d63ea59ca474e4c13..19afd20ccf498c03bddcca40c23705f03b29ac18 100644
--- a/bootx-commons/common-sequence/pom.xml
+++ b/bootx-commons/common-sequence/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-spring/pom.xml b/bootx-commons/common-spring/pom.xml
index d628154fff83775c7621dc0b1a36c1f54d7f13e0..5ccafa9067bd769eb900128e26a6ae9d2b9d3ef5 100644
--- a/bootx-commons/common-spring/pom.xml
+++ b/bootx-commons/common-spring/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-super-query/pom.xml b/bootx-commons/common-super-query/pom.xml
index 0989fc3233a03c4b4aac48d77273151deca81b28..d069d175f22e9eb112da38fc49bbd3ef6bf3ae29 100644
--- a/bootx-commons/common-super-query/pom.xml
+++ b/bootx-commons/common-super-query/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-swagger/pom.xml b/bootx-commons/common-swagger/pom.xml
index 4b542b77aafb44ac91a841ed7600cf8b71d790f9..faaec67d5755bdf0824bad9d033aff40c97d3c2e 100644
--- a/bootx-commons/common-swagger/pom.xml
+++ b/bootx-commons/common-swagger/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-websocket/pom.xml b/bootx-commons/common-websocket/pom.xml
index e9c2b0cbafb2d2f28f365211ec6ef0b0178da8a6..85e4432408bac0c50a4894ccc8133c6ee32f784a 100644
--- a/bootx-commons/common-websocket/pom.xml
+++ b/bootx-commons/common-websocket/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/common-xxl-job/pom.xml b/bootx-commons/common-xxl-job/pom.xml
index 92eabb08c4f60d5a483aabf198c26262d61d4af0..28c0d1ce702d4f66204e1d6e6f5d8260bd7bea17 100644
--- a/bootx-commons/common-xxl-job/pom.xml
+++ b/bootx-commons/common-xxl-job/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-commons/pom.xml b/bootx-commons/pom.xml
index 0c939f89ce8e1bd328fc2b9f08aaafc97d8f565c..ae1cbde134454e4fc6207d7b77a953cbd9235b6c 100644
--- a/bootx-commons/pom.xml
+++ b/bootx-commons/pom.xml
@@ -7,7 +7,7 @@
cn.bootx.platform
bootx-platform
- 1.1.3
+ 1.1.4
bootx-commons
diff --git a/bootx-demo/pom.xml b/bootx-demo/pom.xml
index fc09146fe59f757a57b2fdc11277bc0d94c2464e..162a54153b2103e5dc84aa389ef700496fd66020 100644
--- a/bootx-demo/pom.xml
+++ b/bootx-demo/pom.xml
@@ -5,7 +5,7 @@
bootx-platform
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-modules/module-eshop/pom.xml b/bootx-modules/module-eshop/pom.xml
index 1699325e06bd41886439e8e2afc924e8663bd4eb..1cc0c1d5a53b8b063bd71f99a5a2991c06e7c9fc 100644
--- a/bootx-modules/module-eshop/pom.xml
+++ b/bootx-modules/module-eshop/pom.xml
@@ -5,7 +5,7 @@
bootx-modules
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-modules/pom.xml b/bootx-modules/pom.xml
index 373f65faae67f4d1d7931807bff9883461a3b6a1..77cf248db986ecaaf1c59bb033fca9787fcc771d 100644
--- a/bootx-modules/pom.xml
+++ b/bootx-modules/pom.xml
@@ -5,7 +5,7 @@
bootx-platform
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/pom.xml b/bootx-services/pom.xml
index 29643e5247fea538d5474ec15e1899ffbd6c4f31..7b39fb4aff53bd2626bd702b6900dd4127b1fc9c 100644
--- a/bootx-services/pom.xml
+++ b/bootx-services/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-baseapi/pom.xml b/bootx-services/service-baseapi/pom.xml
index 696ec5c4f08136707dce919ed4b430fa4f6d3ff4..d9baa21739c7ec3464c2e5ed555689dc67e3c958 100644
--- a/bootx-services/service-baseapi/pom.xml
+++ b/bootx-services/service-baseapi/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DynamicDataSourceController.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DynamicDataSourceController.java
new file mode 100644
index 0000000000000000000000000000000000000000..fdf97c0ce6488a29b4a630562597d2815fdb0b83
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DynamicDataSourceController.java
@@ -0,0 +1,67 @@
+package cn.bootx.baseapi.controller;
+
+import cn.bootx.common.core.rest.PageResult;
+import cn.bootx.common.core.rest.Res;
+import cn.bootx.common.core.rest.ResResult;
+import cn.bootx.common.core.rest.param.PageParam;
+import cn.bootx.baseapi.core.dynamicsource.service.DynamicDataSourceService;
+import cn.bootx.baseapi.dto.dynamicsource.DynamicDataSourceDto;
+import cn.bootx.baseapi.param.dynamicsource.DynamicDataSourceParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@Tag(name ="动态数据源管理")
+@RestController
+@RequestMapping("/dynamic/source")
+@RequiredArgsConstructor
+public class DynamicDataSourceController {
+ private final DynamicDataSourceService dynamicDataSourceService;
+
+ @Operation( summary = "添加")
+ @PostMapping(value = "/add")
+ public ResResult add(@RequestBody DynamicDataSourceParam param){
+ dynamicDataSourceService.add(param);
+ return Res.ok();
+ }
+
+ @Operation( summary = "修改")
+ @PostMapping(value = "/update")
+ public ResResult update(@RequestBody DynamicDataSourceParam param){
+ dynamicDataSourceService.update(param);
+ return Res.ok();
+ }
+
+ @Operation( summary = "删除")
+ @DeleteMapping(value = "/delete")
+ public ResResult delete(Long id){
+ dynamicDataSourceService.delete(id);
+ return Res.ok();
+ }
+
+ @Operation( summary = "通过ID查询")
+ @GetMapping(value = "/findById")
+ public ResResult findById(Long id){
+ return Res.ok(dynamicDataSourceService.findById(id));
+ }
+
+ @Operation( summary = "查询所有")
+ @GetMapping(value = "/findAll")
+ public ResResult> findAll(){
+ return Res.ok(dynamicDataSourceService.findAll());
+ }
+
+ @Operation( summary = "分页查询")
+ @GetMapping(value = "/page")
+ public ResResult> page(PageParam pageParam, DynamicDataSourceParam dynamicDataSourceParam){
+ return Res.ok(dynamicDataSourceService.page(pageParam,dynamicDataSourceParam));
+ }
+}
\ No newline at end of file
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/convert/DynamicDataSourceConvert.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/convert/DynamicDataSourceConvert.java
new file mode 100644
index 0000000000000000000000000000000000000000..2c8c2a0a1fea37c9bc70608f6f194b892fcc29a3
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/convert/DynamicDataSourceConvert.java
@@ -0,0 +1,22 @@
+package cn.bootx.baseapi.core.dynamicsource.convert;
+
+import cn.bootx.baseapi.core.dynamicsource.entity.DynamicDataSource;
+import cn.bootx.baseapi.dto.dynamicsource.DynamicDataSourceDto;
+import cn.bootx.baseapi.param.dynamicsource.DynamicDataSourceParam;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@Mapper
+public interface DynamicDataSourceConvert {
+ DynamicDataSourceConvert CONVERT = Mappers.getMapper(DynamicDataSourceConvert.class);
+
+ DynamicDataSource convert(DynamicDataSourceParam in);
+
+ DynamicDataSourceDto convert(DynamicDataSource in);
+
+}
\ No newline at end of file
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceManager.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..987318694389a4845b150ef38e3984e99ef7b023
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceManager.java
@@ -0,0 +1,36 @@
+package cn.bootx.baseapi.core.dynamicsource.dao;
+
+import cn.bootx.common.mybatisplus.impl.BaseManager;
+import cn.bootx.baseapi.param.dynamicsource.DynamicDataSourceParam;
+import cn.bootx.baseapi.core.dynamicsource.entity.DynamicDataSource;
+import cn.bootx.common.core.rest.param.PageParam;
+import cn.bootx.common.mybatisplus.base.MpIdEntity;
+import cn.bootx.common.mybatisplus.impl.BaseManager;
+import cn.bootx.common.mybatisplus.util.MpUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Repository;
+
+import java.util.Optional;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@Repository
+@RequiredArgsConstructor
+public class DynamicDataSourceManager extends BaseManager {
+
+ /**
+ * 分页
+ */
+ public Page page(PageParam pageParam, DynamicDataSourceParam param) {
+ Page mpPage = MpUtil.getMpPage(pageParam, DynamicDataSource.class);
+ return this.lambdaQuery()
+ .select(this.getEntityClass(),MpUtil::excludeBigField)
+ .orderByDesc(MpIdEntity::getId)
+ .page(mpPage);
+ }
+}
\ No newline at end of file
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceMapper.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..9c7f2ef9c1d06f150e393b87d1aefc3fff333374
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/dao/DynamicDataSourceMapper.java
@@ -0,0 +1,14 @@
+package cn.bootx.baseapi.core.dynamicsource.dao;
+
+import cn.bootx.baseapi.core.dynamicsource.entity.DynamicDataSource;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@Mapper
+public interface DynamicDataSourceMapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/entity/DynamicDataSource.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/entity/DynamicDataSource.java
new file mode 100644
index 0000000000000000000000000000000000000000..747690fe4234732803fb48b1393488721c667d37
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/entity/DynamicDataSource.java
@@ -0,0 +1,59 @@
+package cn.bootx.baseapi.core.dynamicsource.entity;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.LocalDate;
+import java.time.LocalTime;
+
+import cn.bootx.common.core.function.EntityBaseFunction;
+import cn.bootx.common.mybatisplus.base.MpBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import cn.bootx.baseapi.dto.dynamicsource.DynamicDataSourceDto;
+import cn.bootx.baseapi.param.dynamicsource.DynamicDataSourceParam;
+import cn.bootx.baseapi.core.dynamicsource.convert.DynamicDataSourceConvert;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+* 动态数据源管理
+* @author xxm
+* @date 2022-09-24
+*/
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Accessors(chain = true)
+@TableName("base_dynamic_data_source")
+public class DynamicDataSource extends MpBaseEntity implements EntityBaseFunction{
+
+ /** 数据源编码 */
+ private String code;
+ /** 数据源名称 */
+ private String name;
+ /** 数据库类型 */
+ private String databaseType;
+ /** 驱动类 */
+ private String dbDriver;
+ /** 数据库地址 */
+ private String dbUrl;
+ /** 数据库名称 */
+ private String dbName;
+ /** 用户名 */
+ private String dbUsername;
+ /** 密码 */
+ private String dbPassword;
+ /** 备注 */
+ private String remark;
+
+ /** 创建对象 */
+ public static DynamicDataSource init(DynamicDataSourceParam in) {
+ return DynamicDataSourceConvert.CONVERT.convert(in);
+ }
+
+ /** 转换成dto */
+ @Override
+ public DynamicDataSourceDto toDto() {
+ return DynamicDataSourceConvert.CONVERT.convert(this);
+ }
+}
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/service/DynamicDataSourceService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/service/DynamicDataSourceService.java
new file mode 100644
index 0000000000000000000000000000000000000000..f8aaa1622f23541c3a27c1da2fcc72f7aa6d8f54
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dynamicsource/service/DynamicDataSourceService.java
@@ -0,0 +1,102 @@
+package cn.bootx.baseapi.core.dynamicsource.service;
+
+import cn.bootx.baseapi.core.dynamicsource.dao.DynamicDataSourceManager;
+import cn.bootx.baseapi.core.dynamicsource.entity.DynamicDataSource;
+import cn.bootx.baseapi.dto.dynamicsource.DynamicDataSourceDto;
+import cn.bootx.baseapi.param.dynamicsource.DynamicDataSourceParam;
+import cn.bootx.common.core.exception.DataNotExistException;
+import cn.bootx.common.core.rest.PageResult;
+import cn.bootx.common.core.rest.param.PageParam;
+import cn.bootx.common.core.util.ResultConvertUtil;
+import cn.bootx.common.mybatisplus.util.MpUtil;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
+import com.baomidou.dynamic.datasource.creator.DataSourceCreator;
+import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.sql.DataSource;
+import java.util.List;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022/9/24
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class DynamicDataSourceService {
+ private final DynamicDataSourceManager dynamicDataSourceManager;
+
+ private final DataSourceCreator hikariDataSourceCreator;
+ private final DynamicRoutingDataSource dynamicRoutingDataSource;
+
+
+ /**
+ * 添加
+ */
+ public void add(DynamicDataSourceParam param){
+ DynamicDataSource dynamicDataSource = DynamicDataSource.init(param);
+ dynamicDataSourceManager.save(dynamicDataSource);
+ }
+
+ /**
+ * 修改
+ */
+ public void update(DynamicDataSourceParam param){
+ DynamicDataSource dynamicDataSource = dynamicDataSourceManager.findById(param.getId()).orElseThrow(DataNotExistException::new);
+
+ BeanUtil.copyProperties(param,dynamicDataSource, CopyOptions.create().ignoreNullValue());
+ dynamicDataSourceManager.updateById(dynamicDataSource);
+ }
+
+ /**
+ * 分页
+ */
+ public PageResult page(PageParam pageParam, DynamicDataSourceParam dynamicDataSourceParam){
+ return MpUtil.convert2DtoPageResult(dynamicDataSourceManager.page(pageParam,dynamicDataSourceParam));
+ }
+
+ /**
+ * 获取单条
+ */
+ public DynamicDataSourceDto findById(Long id){
+ return dynamicDataSourceManager.findById(id).map(DynamicDataSource::toDto).orElseThrow(DataNotExistException::new);
+ }
+
+ /**
+ * 获取全部
+ */
+ public List findAll(){
+ return ResultConvertUtil.dtoListConvert(dynamicDataSourceManager.findAll());
+ }
+
+ /**
+ * 删除
+ */
+ public void delete(Long id){
+ dynamicDataSourceManager.deleteById(id);
+ }
+
+ /**
+ * 添加数据源
+ */
+ private void addDynamicDataSource(DynamicDataSource dynamicDataSource, String dbPassword) {
+ DataSourceProperty dataSourceProperty = new DataSourceProperty();
+ dataSourceProperty.setUrl(dynamicDataSource.getDbUrl());
+ dataSourceProperty.setPassword(dbPassword);
+ dataSourceProperty.setDriverClassName(dynamicDataSource.getDbDriver());
+ dataSourceProperty.setUsername(dynamicDataSource.getDbUsername());
+ DataSource dataSource = hikariDataSourceCreator.createDataSource(dataSourceProperty);
+ try {
+ dynamicRoutingDataSource.addDataSource(dynamicDataSource.getCode(), dataSource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dynamicsource/DynamicDataSourceDto.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dynamicsource/DynamicDataSourceDto.java
new file mode 100644
index 0000000000000000000000000000000000000000..e5d0a5f0930341cf74720180f97b04005a421049
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dynamicsource/DynamicDataSourceDto.java
@@ -0,0 +1,43 @@
+package cn.bootx.baseapi.dto.dynamicsource;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.LocalDate;
+
+import cn.bootx.common.core.rest.dto.BaseDto;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Schema(title = "动态数据源管理")
+@Accessors(chain = true)
+public class DynamicDataSourceDto extends BaseDto {
+
+ @Schema(description = "数据源编码")
+ private String code;
+ @Schema(description = "数据源名称")
+ private String name;
+ @Schema(description = "数据库类型")
+ private String databaseType;
+ @Schema(description = "驱动类")
+ private String dbDriver;
+ @Schema(description = "数据库地址")
+ private String dbUrl;
+ @Schema(description = "数据库名称")
+ private String dbName;
+ @Schema(description = "用户名")
+ private String dbUsername;
+ @Schema(description = "密码")
+ private String dbPassword;
+ @Schema(description = "备注")
+ private String remark;
+
+}
\ No newline at end of file
diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dynamicsource/DynamicDataSourceParam.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dynamicsource/DynamicDataSourceParam.java
new file mode 100644
index 0000000000000000000000000000000000000000..9be85af5b728d03440bb4c643574988227b6e24e
--- /dev/null
+++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dynamicsource/DynamicDataSourceParam.java
@@ -0,0 +1,39 @@
+package cn.bootx.baseapi.param.dynamicsource;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * 动态数据源管理
+ * @author xxm
+ * @date 2022-09-24
+ */
+@Data
+@Schema(title = "动态数据源管理")
+@Accessors(chain = true)
+public class DynamicDataSourceParam {
+
+ @Schema(description= "主键")
+ private Long id;
+
+ @Schema(description = "数据源编码")
+ private String code;
+ @Schema(description = "数据源名称")
+ private String name;
+ @Schema(description = "数据库类型")
+ private String databaseType;
+ @Schema(description = "驱动类")
+ private String dbDriver;
+ @Schema(description = "数据库地址")
+ private String dbUrl;
+ @Schema(description = "数据库名称")
+ private String dbName;
+ @Schema(description = "用户名")
+ private String dbUsername;
+ @Schema(description = "密码")
+ private String dbPassword;
+ @Schema(description = "备注")
+ private String remark;
+
+}
\ No newline at end of file
diff --git a/bootx-services/service-goods/pom.xml b/bootx-services/service-goods/pom.xml
index d62d2186fe231b8dd5c464380d19652f58f8059a..34ff044fa8a3c8a29b9b30bea0de8304e683001e 100644
--- a/bootx-services/service-goods/pom.xml
+++ b/bootx-services/service-goods/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-iam/pom.xml b/bootx-services/service-iam/pom.xml
index 33549a0e0a52eeedcd6b1e7746e98cb9681410b2..148a0d9efdf5e22164a15fc81547e4dc404b1b12 100644
--- a/bootx-services/service-iam/pom.xml
+++ b/bootx-services/service-iam/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-notice/pom.xml b/bootx-services/service-notice/pom.xml
index c534fde18fc25af72230ebbe11aff3c135930927..c55cbeecb1c870c4976c40f36339f15af0880360 100644
--- a/bootx-services/service-notice/pom.xml
+++ b/bootx-services/service-notice/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-notice/src/main/java/cn/bootx/notice/code/MessageTemplateCode.java b/bootx-services/service-notice/src/main/java/cn/bootx/notice/code/MessageTemplateCode.java
index c57e383e3e53fa011b742da3c9b507519546b417..91a615b07ca80ab888e308c59115c065b1f18707 100644
--- a/bootx-services/service-notice/src/main/java/cn/bootx/notice/code/MessageTemplateCode.java
+++ b/bootx-services/service-notice/src/main/java/cn/bootx/notice/code/MessageTemplateCode.java
@@ -7,6 +7,9 @@ package cn.bootx.notice.code;
*/
public interface MessageTemplateCode {
+ /** 站内信 */
+ int SITE = 0;
+
/** 钉钉 */
int DING_TALK = 1;
diff --git a/bootx-services/service-notice/src/main/java/cn/bootx/notice/core/site/service/SiteMessageService.java b/bootx-services/service-notice/src/main/java/cn/bootx/notice/core/site/service/SiteMessageService.java
index c2f7a0f5a0028f9a11db477852737ccda956ea29..caa9605b311916943d36f2a463b444f4915483cf 100644
--- a/bootx-services/service-notice/src/main/java/cn/bootx/notice/core/site/service/SiteMessageService.java
+++ b/bootx-services/service-notice/src/main/java/cn/bootx/notice/core/site/service/SiteMessageService.java
@@ -27,10 +27,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
+import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
+import static cn.bootx.common.core.code.CommonCode.SYSTEM_DEFAULT_USERID;
+import static cn.bootx.common.core.code.CommonCode.SYSTEM_DEFAULT_USERNAME;
import static cn.bootx.notice.code.SiteMessageCode.*;
/**
@@ -109,6 +112,7 @@ public class SiteMessageService {
SiteMessage siteMessage = new SiteMessage()
.setTitle(param.getTitle())
.setContent(param.getContent())
+ .setSendState(STATE_SENT)
.setReceiveType(param.getReceiveType())
.setEfficientTime(param.getEfficientTime())
.setSenderId(param.getSenderId())
@@ -117,15 +121,44 @@ public class SiteMessageService {
siteMessageManager.save(siteMessage);
// 添加消息关联人信息
if (Objects.equals(RECEIVE_USER,param.getReceiveType())){
+
List siteMessageUsers = param.getReceiveIds().stream()
.map(userId -> new SiteMessageUser()
.setMessageId(siteMessage.getId())
.setReceiveId(userId))
.collect(Collectors.toList());
siteMessageUserManager.saveAll(siteMessageUsers);
+ userWsNoticeService.sendMessageByUsers(WsRes.eventNotice(EVENT_MESSAGE_UPDATE),param.getReceiveIds());
}
}
+ /**
+ * 发送给单个用户信息, 发送人为系统
+ */
+ public void sendSingleUserBySystem(String title, String content,Long userId){
+ val param = new SendSiteMessageParam()
+ .setTitle(title)
+ .setContent(content)
+ .setSenderId(SYSTEM_DEFAULT_USERID)
+ .setSenderName(SYSTEM_DEFAULT_USERNAME)
+ .setReceiveType(RECEIVE_USER)
+ .setReceiveIds(Collections.singletonList(userId));
+ this.send(param);
+ }
+ /**
+ * 发送给多个用户信息, 发送人为系统
+ */
+ public void sendMultiUserBySystem(String title, String content,List userIds){
+ val param = new SendSiteMessageParam()
+ .setTitle(title)
+ .setContent(content)
+ .setSenderId(SYSTEM_DEFAULT_USERID)
+ .setSenderName(SYSTEM_DEFAULT_USERNAME)
+ .setReceiveType(RECEIVE_USER)
+ .setReceiveIds(userIds);
+ this.send(param);
+ }
+
/**
* 撤回消息
*/
@@ -165,7 +198,6 @@ public class SiteMessageService {
*/
public PageResult pageByReceive(PageParam pageParam,SiteMessageInfo query){
Long userId = SecurityUtil.getUserId();
-// Long userId = 0L;
return MpUtil.convert2PageResult(siteMessageManager.pageByReceive(pageParam,query,userId));
}
/**
@@ -173,7 +205,6 @@ public class SiteMessageService {
*/
public PageResult pageBySender(PageParam pageParam,SiteMessageInfo query){
Long userId = SecurityUtil.getUserId();
-// Long userId = 0L;
return MpUtil.convert2DtoPageResult(siteMessageManager.pageBySender(pageParam,query,userId));
}
diff --git a/bootx-services/service-office/pom.xml b/bootx-services/service-office/pom.xml
index cda6becd6435bc66df6c176d049b8789d6da6827..7b3ab5602586ef1929bb17faa25ba0849a7402be 100644
--- a/bootx-services/service-office/pom.xml
+++ b/bootx-services/service-office/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-office/src/main/java/cn/bootx/office/code/NoticeMessageCode.java b/bootx-services/service-office/src/main/java/cn/bootx/office/code/NoticeMessageCode.java
index 37b6d4174f8c2f7ee2b489aac93125f0c7b6be2e..88c200e0c23dc65d306589a11409b7e116cfde13 100644
--- a/bootx-services/service-office/src/main/java/cn/bootx/office/code/NoticeMessageCode.java
+++ b/bootx-services/service-office/src/main/java/cn/bootx/office/code/NoticeMessageCode.java
@@ -6,4 +6,16 @@ package cn.bootx.office.code;
* @date 2022/9/18
*/
public interface NoticeMessageCode {
+
+ String BPM_TASK_CREATED = "BpmTaskCreated";
+ String BPM_TASK_ASSIGN_CREATED = "BpmTaskAssignCreated";
+ String BPM_TASK_ASSIGN_CANCEL = "BpmTaskAssignCancel";
+ String BPM_TASK_COMPLETED = "BpmTaskCompleted";
+ String BPM_TASK_CANCEL = "BpmTaskCancel";
+ String BPM_TASK_REJECT = "BpmTaskReject";
+
+ String BPM_INSTANCE_COMPLETED = "BpmInstanceCompleted";
+ String BPM_INSTANCE_CANCEL = "BpmInstanceCancel";
+
+
}
diff --git a/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmInstanceNoticeService.java b/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmInstanceNoticeService.java
index 9a68c42c1a196330f3b9e4fa8e99553245a56a64..d5370b1e244f02b6b4deb9dac0808f38c34dfdf6 100644
--- a/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmInstanceNoticeService.java
+++ b/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmInstanceNoticeService.java
@@ -1,7 +1,7 @@
package cn.bootx.office.handler.message;
import cn.bootx.notice.core.site.service.SiteMessageService;
-import cn.bootx.notice.param.site.SendSiteMessageParam;
+import cn.bootx.notice.core.template.service.MessageTemplateService;
import cn.bootx.starter.flowable.core.instance.entity.BpmInstance;
import cn.bootx.starter.flowable.event.ProcessCancelEvent;
import cn.bootx.starter.flowable.event.ProcessCompletedEvent;
@@ -11,11 +11,11 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
-import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
-import static cn.bootx.common.core.code.CommonCode.SYSTEM_DEFAULT_USERID;
-import static cn.bootx.common.core.code.CommonCode.SYSTEM_DEFAULT_USERNAME;
-import static cn.bootx.notice.code.SiteMessageCode.RECEIVE_USER;
+import static cn.bootx.office.code.NoticeMessageCode.BPM_INSTANCE_CANCEL;
+import static cn.bootx.office.code.NoticeMessageCode.BPM_INSTANCE_COMPLETED;
/**
* 流程实例消息发送
@@ -27,6 +27,8 @@ import static cn.bootx.notice.code.SiteMessageCode.RECEIVE_USER;
@RequiredArgsConstructor
public class BpmInstanceNoticeService {
private final SiteMessageService messageService;
+ private final MessageTemplateService messageTemplateService;
+
/**
* 流程完成时通知发起人
*/
@@ -34,27 +36,21 @@ public class BpmInstanceNoticeService {
public void ProcessCompleted(ProcessCompletedEvent event){
BpmInstance bpmInstance = event.getBpmInstance();
// 发送完成消息
- String title = StrUtil.format("{} 执行完成");
- String content = StrUtil.format("{} 执行完成");;
-
- SendSiteMessageParam param = new SendSiteMessageParam()
- .setTitle(title)
- .setContent(content)
- .setSenderId(SYSTEM_DEFAULT_USERID)
- .setSenderName(SYSTEM_DEFAULT_USERNAME)
- .setReceiveType(RECEIVE_USER)
- .setReceiveIds(Collections.singletonList(bpmInstance.getStartUserId()));
-// messageService.send(param);
-
-
+ String title = StrUtil.format("{} 流程执行完成",bpmInstance.getInstanceName());
+ Map map = new HashMap<>();
+ String content = messageTemplateService.rendering(BPM_INSTANCE_COMPLETED,map);
+ messageService.sendSingleUserBySystem(title,content,bpmInstance.getStartUserId());
}
+
/**
* 流程取消时通知发起人
*/
@EventListener
public void ProcessCancel(ProcessCancelEvent event){
BpmInstance bpmInstance = event.getBpmInstance();
- // 发送取消消息
-
+ String title = StrUtil.format("{} 流程被取消",bpmInstance.getInstanceName());
+ Map map = new HashMap<>();
+ String content = messageTemplateService.rendering(BPM_INSTANCE_CANCEL,map);
+ messageService.sendSingleUserBySystem(title,content,bpmInstance.getStartUserId());
}
}
diff --git a/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmTaskNoticeService.java b/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmTaskNoticeService.java
index fc0733532b2f60507d63c2b160304f79454ff9bc..cf8be9f97ab695b2747794d323fc12912b8491a8 100644
--- a/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmTaskNoticeService.java
+++ b/bootx-services/service-office/src/main/java/cn/bootx/office/handler/message/BpmTaskNoticeService.java
@@ -1,11 +1,21 @@
package cn.bootx.office.handler.message;
import cn.bootx.notice.core.site.service.SiteMessageService;
+import cn.bootx.notice.core.template.service.MessageTemplateService;
+import cn.bootx.office.code.NoticeMessageCode;
+import cn.bootx.starter.flowable.core.instance.entity.BpmTask;
import cn.bootx.starter.flowable.event.*;
+import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
+import org.springframework.retry.annotation.Backoff;
+import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.Map;
/**
* 消息发送
@@ -17,23 +27,38 @@ import org.springframework.stereotype.Service;
@RequiredArgsConstructor
public class BpmTaskNoticeService {
private final SiteMessageService messageService;
+ private final MessageTemplateService messageTemplateService;
/**
* 流程任务创建事件
*/
@EventListener
public void taskCreated(TaskCreatedEvent event){
-
+ BpmTask bpmTask = event.getBpmTask();
+ Map map = new HashMap<>();
+ String title = StrUtil.format("{} 的 {} 需要处理", bpmTask.getInstanceName(),bpmTask.getNodeName());
+ String content = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_CREATED, map);
+ messageService.sendSingleUserBySystem(title,content,bpmTask.getUserId());
}
/**
* 流程任务更改处理人事件
*/
@EventListener
+ @Transactional(rollbackFor = Exception.class)
+ @Retryable(value = Exception.class, maxAttempts = 2, backoff = @Backoff(value = 2000L))
public void taskAssign(TaskAssignEvent event){
// 发送给原处理人
-
+ BpmTask bpmTask = event.getBpmTask();
+ Map oldMap = new HashMap<>();
+ String oldTitle = StrUtil.format("{} 的 {} 任务已成功被委派给 {}",bpmTask.getInstanceName(),bpmTask.getNodeName(),event.getNewAssignName());
+ String oldContent = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_ASSIGN_CANCEL, oldMap);
+ messageService.sendSingleUserBySystem(oldTitle,oldContent,event.getOldAssign());
// 发送给新处理人
+ Map newMap = new HashMap<>();
+ String newTitle = StrUtil.format("{} 的 {} {} 任务已经委派给您",event.getOldAssignName(),bpmTask.getInstanceName(),bpmTask.getNodeName());
+ String newContent = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_ASSIGN_CREATED, newMap);
+ messageService.sendSingleUserBySystem(newTitle,newContent,event.getNewAssign());
}
/**
@@ -41,7 +66,16 @@ public class BpmTaskNoticeService {
*/
@EventListener
public void taskCompleted(TaskCompletedEvent event){
-
+ if (!event.isMulti()){
+ return;
+ }
+ for (BpmTask bpmTask : event.getBpmTasks()) {
+ // 发送给新处理人
+ Map newMap = new HashMap<>();
+ String newTitle = StrUtil.format("{} {} 任务已经被完成",bpmTask.getInstanceName(),bpmTask.getNodeName());
+ String newContent = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_COMPLETED, newMap);
+ messageService.sendSingleUserBySystem(newTitle,newContent,bpmTask.getUserId());
+ }
}
/**
@@ -49,14 +83,23 @@ public class BpmTaskNoticeService {
*/
@EventListener
public void taskCancel(TaskCancelEvent event){
-
+ for (BpmTask bpmTask : event.getBpmTasks()) {
+ Map map = new HashMap<>();
+ String title = StrUtil.format("{} {} 任务已经被完成",bpmTask.getInstanceName(),bpmTask.getNodeName());
+ String content = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_CANCEL, map);
+ messageService.sendSingleUserBySystem(title,content,bpmTask.getUserId());
+ }
}
/**
* 流程任务驳回事件
*/
@EventListener
- public void taskRe(TaskRejectEvent event){
-
+ public void taskReject(TaskRejectEvent event){
+ BpmTask bpmTask = event.getBpmTask();
+ Map map = new HashMap<>();
+ String title = StrUtil.format("{} {} 任务已经被被驳回",bpmTask.getInstanceName(),bpmTask.getNodeName());
+ String content = messageTemplateService.rendering(NoticeMessageCode.BPM_TASK_REJECT, map);
+ messageService.sendSingleUserBySystem(title,content,bpmTask.getUserId());
}
}
diff --git a/bootx-services/service-order/pom.xml b/bootx-services/service-order/pom.xml
index cba4206f2a854c8b57fec3070fbb7b6f98311bdf..e88e136fa4a6af68bd72700166544905f913e4b7 100644
--- a/bootx-services/service-order/pom.xml
+++ b/bootx-services/service-order/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-payment/pom.xml b/bootx-services/service-payment/pom.xml
index 1bfef9e4b24e8ee572a35e27f37561b32351c8d2..2d918990fc3cd8ce7880861311bb1f5c7cc4725a 100644
--- a/bootx-services/service-payment/pom.xml
+++ b/bootx-services/service-payment/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-services/service-sales/pom.xml b/bootx-services/service-sales/pom.xml
index 96625d6edb61822858c4b1e92442fd2b77ad8b68..8751ad3e0471855c55df95b9d199aeda4b86d584 100644
--- a/bootx-services/service-sales/pom.xml
+++ b/bootx-services/service-sales/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.1.3
+ 1.1.4
4.0.0
diff --git a/bootx-start/pom.xml b/bootx-start/pom.xml
index fe10ddedba109bacfe1cd083038a1ec9f76af9d5..15ab96d3711790c5a5b0657075dd92373ecb297e 100644
--- a/bootx-start/pom.xml
+++ b/bootx-start/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-platform
- 1.1.3
+ 1.1.4
4.0.0
bootx-start
diff --git a/bootx-start/src/main/resources/db/migration/V1.1.3_220921__release.sql b/bootx-start/src/main/resources/db/migration/V1.1.4_220928__release.sql
similarity index 98%
rename from bootx-start/src/main/resources/db/migration/V1.1.3_220921__release.sql
rename to bootx-start/src/main/resources/db/migration/V1.1.4_220928__release.sql
index 97ce9d57e57f2f196e5862ad9b23a4b5b017f45f..c5222c4f8dce363a43a0ca15a65b30404fb26e18 100644
--- a/bootx-start/src/main/resources/db/migration/V1.1.3_220921__release.sql
+++ b/bootx-start/src/main/resources/db/migration/V1.1.4_220928__release.sql
@@ -216,6 +216,34 @@ INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, '
INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0);
INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0);
INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0);
+INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1);
+
+
+-- ----------------------------
+-- Table structure for base_dynamic_data_source
+-- ----------------------------
+CREATE TABLE `base_dynamic_data_source` (
+ `id` bigint(20) NOT NULL,
+ `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源编码',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据源名称',
+ `database_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库类型',
+ `db_driver` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '驱动类',
+ `db_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库地址',
+ `db_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库名称',
+ `db_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户名',
+ `db_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '版本',
+ `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '动态数据源管理' ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of base_dynamic_data_source
+-- ----------------------------
-- ----------------------------
-- Table structure for base_dynamic_form
@@ -1182,6 +1210,7 @@ INSERT INTO `iam_perm_menu` VALUES (1564626025579462656, 'admin', 15377324406325
INSERT INTO `iam_perm_menu` VALUES (1571023702122766336, 'admin', 1562460770753544192, '未处理任务', 'BpmTodoTask', NULL, b'0', '', b'0', b'0', 'bpm/task/TodoTaskList', NULL, '/bpm/todo', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:30:13', 1399985191002447872, '2022-09-17 14:31:23', 2, 0);
INSERT INTO `iam_perm_menu` VALUES (1571023925834358784, 'admin', 1562460770753544192, '已处理任务', 'BpmDoneTask', NULL, b'0', '', b'0', b'0', 'bpm/task/DoneTaskList', NULL, '/bpm/done', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:31:07', 1399985191002447872, '2022-09-17 14:31:07', 0, 0);
INSERT INTO `iam_perm_menu` VALUES (1571024250171498496, 'admin', 1562460770753544192, '流程实例', 'BpmInstance', NULL, b'0', '', b'0', b'0', 'bpm/instance/InstanceList', NULL, '/bpm/instance', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-17 14:32:24', 1399985191002447872, '2022-09-17 14:32:24', 0, 0);
+INSERT INTO `iam_perm_menu` VALUES (1573669546890297344, 'admin', 1552207982510706688, '动态数据源', 'DynamicSource', NULL, b'0', '', b'0', b'0', 'develop/dynamicsource/DynamicDataSourceList', NULL, '/develop/source', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2022-09-24 21:43:52', 1399985191002447872, '2022-09-24 21:43:52', 0, 0);
-- ----------------------------
-- Table structure for iam_perm_path
@@ -1501,6 +1530,13 @@ CREATE TABLE `notice_message_template` (
-- Records of notice_message_template
-- ----------------------------
INSERT INTO `notice_message_template` VALUES (1424936204932169730, 'cs', '测试', 'hello ${msg}6666666666666666666666666666', 1, '测试模板', 0, '2021-08-10 11:30:40', 0, '2021-08-10 11:30:40', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573951326893510656, 'BpmTaskCreated', '流程任务创建事件', '流程任务创建事件', 0, '', 1399985191002447872, '2022-09-25 16:23:34', 1399985191002447872, '2022-09-25 16:23:34', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573951515616219136, 'BpmTaskAssignCreated', '流程任务更改处理人事件(新处理人)', '流程任务更改处理人事件(新处理人)', 0, '', 1399985191002447872, '2022-09-25 16:24:19', 1399985191002447872, '2022-09-25 16:27:09', 1, 0);
+INSERT INTO `notice_message_template` VALUES (1573952505056727040, 'BpmTaskAssignCancel', '流程任务更改处理人事件(原处理人)', '流程任务更改处理人事件(原处理人)', 0, '', 1399985191002447872, '2022-09-25 16:28:14', 1399985191002447872, '2022-09-25 16:28:14', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952568654958592, 'BpmTaskCancel', '流程任务取消事件', '流程任务取消事件', 0, '', 1399985191002447872, '2022-09-25 16:28:30', 1399985191002447872, '2022-09-25 16:28:30', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952621826150400, 'BpmTaskReject', '流程任务驳回事件', '流程任务驳回事件', 0, '', 1399985191002447872, '2022-09-25 16:28:42', 1399985191002447872, '2022-09-25 16:28:42', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952709432578048, 'BpmInstanceCompleted', '流程完成时通知发起人', '流程完成时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:03', 1399985191002447872, '2022-09-25 16:29:03', 0, 0);
+INSERT INTO `notice_message_template` VALUES (1573952762507300864, 'BpmInstanceCancel', '流程取消时通知发起人', '流程取消时通知发起人', 0, '', 1399985191002447872, '2022-09-25 16:29:16', 1399985191002447872, '2022-09-25 16:29:16', 0, 0);
-- ----------------------------
-- Table structure for notice_site_message
diff --git a/pom.xml b/pom.xml
index e528bfc44a84c7e48a00a2fa673139190a2dc90f..88dd7660474106125c4aaa03377ebc493a49c1cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.7.3
+ 2.7.4
@@ -15,7 +15,7 @@
cn.bootx.platform
bootx-platform
pom
- 1.1.3
+ 1.1.4
bootx-common-core
@@ -33,7 +33,7 @@
1.8
- 1.1.3
+ 1.1.4
5.8.6
6.2.2
@@ -49,7 +49,7 @@
7.15.0
1.4.01
6.7.2
-
+
1.2.11
3.5.3
2.3.1
@@ -64,7 +64,7 @@
1.5.2.Final
0.2.0
2.3
- 4.4.0
+ 4.4.1.B
1.3.81