Commit d6e736bd56ee261ea68c936b27dd90cbc891544d

Authored by youkehai
2 parents 4efa93b0 f864aa1c

Merge branch 'master' into feature/bpm-delegate

# Conflicts:
#	yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java
#	yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
Showing 18 changed files with 340 additions and 356 deletions
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 30 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
31 31
32 <properties> 32 <properties>
33 - <revision>1.8.1-snapshot</revision> 33 + <revision>1.8.2-snapshot</revision>
34 <!-- Maven 相关 --> 34 <!-- Maven 相关 -->
35 <java.version>1.8</java.version> 35 <java.version>1.8</java.version>
36 <maven.compiler.source>${java.version}</maven.compiler.source> 36 <maven.compiler.source>${java.version}</maven.compiler.source>
sql/mysql/ruoyi-vue-pro.sql
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 Target Server Version : 80034 11 Target Server Version : 80034
12 File Encoding : 65001 12 File Encoding : 65001
13 13
14 - Date: 03/09/2023 19:13:55 14 + Date: 24/09/2023 23:23:06
15 */ 15 */
16 16
17 SET NAMES utf8mb4; 17 SET NAMES utf8mb4;
@@ -72,6 +72,7 @@ CREATE TABLE `QRTZ_CRON_TRIGGERS` ( @@ -72,6 +72,7 @@ CREATE TABLE `QRTZ_CRON_TRIGGERS` (
72 -- Records of QRTZ_CRON_TRIGGERS 72 -- Records of QRTZ_CRON_TRIGGERS
73 -- ---------------------------- 73 -- ----------------------------
74 BEGIN; 74 BEGIN;
  75 +INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'demoJob', 'DEFAULT', '0 0 0 * * ?', 'Asia/Shanghai');
75 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai'); 76 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai');
76 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); 77 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai');
77 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai'); 78 INSERT INTO `QRTZ_CRON_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `CRON_EXPRESSION`, `TIME_ZONE_ID`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', '0 0/1 * * * ?', 'Asia/Shanghai');
@@ -135,6 +136,7 @@ CREATE TABLE `QRTZ_JOB_DETAILS` ( @@ -135,6 +136,7 @@ CREATE TABLE `QRTZ_JOB_DETAILS` (
135 -- Records of QRTZ_JOB_DETAILS 136 -- Records of QRTZ_JOB_DETAILS
136 -- ---------------------------- 137 -- ----------------------------
137 BEGIN; 138 BEGIN;
  139 +INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'demoJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000147400104A4F425F48414E444C45525F4E414D4574000764656D6F4A6F627800);
138 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800); 140 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800);
139 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800); 141 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000127400104A4F425F48414E444C45525F4E414D457400117061794F726465724578706972654A6F627800);
140 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800); 142 INSERT INTO `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `JOB_CLASS_NAME`, `IS_DURABLE`, `IS_NONCONCURRENT`, `IS_UPDATE_DATA`, `REQUESTS_RECOVERY`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000117400104A4F425F48414E444C45525F4E414D4574000F7061794F7264657253796E634A6F627800);
@@ -191,7 +193,7 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE` ( @@ -191,7 +193,7 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE` (
191 -- Records of QRTZ_SCHEDULER_STATE 193 -- Records of QRTZ_SCHEDULER_STATE
192 -- ---------------------------- 194 -- ----------------------------
193 BEGIN; 195 BEGIN;
194 -INSERT INTO `QRTZ_SCHEDULER_STATE` (`SCHED_NAME`, `INSTANCE_NAME`, `LAST_CHECKIN_TIME`, `CHECKIN_INTERVAL`) VALUES ('schedulerName', 'Yunai1690117495401', 1690119854263, 15000); 196 +INSERT INTO `QRTZ_SCHEDULER_STATE` (`SCHED_NAME`, `INSTANCE_NAME`, `LAST_CHECKIN_TIME`, `CHECKIN_INTERVAL`) VALUES ('schedulerName', 'Yunai.local1694844151505', 1694844218609, 15000);
195 COMMIT; 197 COMMIT;
196 198
197 -- ---------------------------- 199 -- ----------------------------
@@ -285,6 +287,7 @@ CREATE TABLE `QRTZ_TRIGGERS` ( @@ -285,6 +287,7 @@ CREATE TABLE `QRTZ_TRIGGERS` (
285 -- Records of QRTZ_TRIGGERS 287 -- Records of QRTZ_TRIGGERS
286 -- ---------------------------- 288 -- ----------------------------
287 BEGIN; 289 BEGIN;
  290 +INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'demoJob', 'DEFAULT', 'demoJob', 'DEFAULT', NULL, 1694880000000, -1, 5, 'WAITING', 'CRON', 1694844083000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D7400007400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000A74000F4A4F425F52455452595F434F554E547371007E000A000000017800);
288 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); 291 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1688907102000, 1688907101000, 5, 'PAUSED', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800);
289 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); 292 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderExpireJob', 'DEFAULT', 'payOrderExpireJob', 'DEFAULT', NULL, 1690011600000, -1, 5, 'PAUSED', 'CRON', 1690011553000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800);
290 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800); 293 INSERT INTO `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `JOB_NAME`, `JOB_GROUP`, `DESCRIPTION`, `NEXT_FIRE_TIME`, `PREV_FIRE_TIME`, `PRIORITY`, `TRIGGER_STATE`, `TRIGGER_TYPE`, `START_TIME`, `END_TIME`, `CALENDAR_NAME`, `MISFIRE_INSTR`, `JOB_DATA`) VALUES ('schedulerName', 'payOrderSyncJob', 'DEFAULT', 'payOrderSyncJob', 'DEFAULT', NULL, 1690011600000, 1690011540000, 5, 'PAUSED', 'CRON', 1690007785000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800);
@@ -360,7 +363,7 @@ CREATE TABLE `infra_api_error_log` ( @@ -360,7 +363,7 @@ CREATE TABLE `infra_api_error_log` (
360 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 363 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
361 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 364 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
362 PRIMARY KEY (`id`) USING BTREE 365 PRIMARY KEY (`id`) USING BTREE
363 -) ENGINE = InnoDB AUTO_INCREMENT = 1497 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; 366 +) ENGINE = InnoDB AUTO_INCREMENT = 1544 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志';
364 367
365 -- ---------------------------- 368 -- ----------------------------
366 -- Records of infra_api_error_log 369 -- Records of infra_api_error_log
@@ -398,7 +401,7 @@ CREATE TABLE `infra_codegen_column` ( @@ -398,7 +401,7 @@ CREATE TABLE `infra_codegen_column` (
398 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 401 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
399 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 402 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
400 PRIMARY KEY (`id`) USING BTREE 403 PRIMARY KEY (`id`) USING BTREE
401 -) ENGINE = InnoDB AUTO_INCREMENT = 1756 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; 404 +) ENGINE = InnoDB AUTO_INCREMENT = 1755 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义';
402 405
403 -- ---------------------------- 406 -- ----------------------------
404 -- Records of infra_codegen_column 407 -- Records of infra_codegen_column
@@ -514,7 +517,7 @@ CREATE TABLE `infra_file` ( @@ -514,7 +517,7 @@ CREATE TABLE `infra_file` (
514 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 517 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
515 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 518 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
516 PRIMARY KEY (`id`) USING BTREE 519 PRIMARY KEY (`id`) USING BTREE
517 -) ENGINE = InnoDB AUTO_INCREMENT = 1054 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; 520 +) ENGINE = InnoDB AUTO_INCREMENT = 1055 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表';
518 521
519 -- ---------------------------- 522 -- ----------------------------
520 -- Records of infra_file 523 -- Records of infra_file
@@ -545,12 +548,7 @@ CREATE TABLE `infra_file_config` ( @@ -545,12 +548,7 @@ CREATE TABLE `infra_file_config` (
545 -- Records of infra_file_config 548 -- Records of infra_file_config
546 -- ---------------------------- 549 -- ----------------------------
547 BEGIN; 550 BEGIN;
548 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库', 1, '我是数据库', b'1', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2023-04-08 09:44:47', b'0');  
549 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (5, '本地磁盘', 10, '测试下本地存储', b'0', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.local.LocalFileClientConfig\",\"basePath\":\"/Users/yunai/file_test\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:57:00', '1', '2023-04-08 09:44:47', b'0');  
550 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (11, 'S3 - 七牛云', 20, NULL, b'0', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3-cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8\",\"accessSecret\":\"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP\"}', '1', '2022-03-19 18:00:03', '1', '2023-04-08 09:44:47', b'0');  
551 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (15, 'S3 - 七牛云', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3-cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8\",\"accessSecret\":\"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP\"}', '1', '2022-06-10 20:50:41', '1', '2023-04-08 09:44:47', b'0');  
552 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (16, 'S3 - 七牛云', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3-cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8\",\"accessSecret\":\"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP\"}', '1', '2022-06-11 20:32:08', '1', '2023-04-08 09:44:47', b'0');  
553 -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, 'S3 - 七牛云', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3-cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"b7yvuhBSAGjmtPhMFcn9iMOxUOY_I06cA_p0ZUx8\",\"accessSecret\":\"kXM1l5ia1RvSX3QaOEcwI3RLz3Y2rmNszWonKZtP\"}', '1', '2022-06-11 20:32:47', '1', '2023-04-08 09:44:47', b'0'); 551 +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库', 1, '我是数据库', b'1', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2023-09-15 12:05:12', b'0');
554 COMMIT; 552 COMMIT;
555 553
556 -- ---------------------------- 554 -- ----------------------------
@@ -568,7 +566,7 @@ CREATE TABLE `infra_file_content` ( @@ -568,7 +566,7 @@ CREATE TABLE `infra_file_content` (
568 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 566 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
569 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 567 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
570 PRIMARY KEY (`id`) USING BTREE 568 PRIMARY KEY (`id`) USING BTREE
571 -) ENGINE = InnoDB AUTO_INCREMENT = 145 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; 569 +) ENGINE = InnoDB AUTO_INCREMENT = 149 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表';
572 570
573 -- ---------------------------- 571 -- ----------------------------
574 -- Records of infra_file_content 572 -- Records of infra_file_content
@@ -596,17 +594,17 @@ CREATE TABLE `infra_job` ( @@ -596,17 +594,17 @@ CREATE TABLE `infra_job` (
596 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 594 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
597 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 595 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
598 PRIMARY KEY (`id`) USING BTREE 596 PRIMARY KEY (`id`) USING BTREE
599 -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务表'; 597 +) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务表';
600 598
601 -- ---------------------------- 599 -- ----------------------------
602 -- Records of infra_job 600 -- Records of infra_job
603 -- ---------------------------- 601 -- ----------------------------
604 BEGIN; 602 BEGIN;
605 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', '2021-10-27 08:34:42', '1', '2023-07-09 20:51:41', b'0'); 603 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (5, '支付通知 Job', 2, 'payNotifyJob', NULL, '* * * * * ?', 0, 0, 0, '1', '2021-10-27 08:34:42', '1', '2023-07-09 20:51:41', b'0');
606 -INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (16, 'Job 示例', 1, 'demoJob', NULL, '* * * L * ?', 1, 1, 0, '1', '2022-09-24 22:31:41', '1', '2022-09-24 22:31:42', b'0');  
607 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', b'0'); 604 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', b'0');
608 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', b'0'); 605 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', b'0');
609 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, '退款订单的同步 Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-23 21:03:44', '1', '2023-07-23 21:09:00', b'0'); 606 INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, '退款订单的同步 Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-23 21:03:44', '1', '2023-07-23 21:09:00', b'0');
  607 +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (20, 'Job 示例', 1, 'demoJob', '', '0 0 0 * * ?', 1, 10, 0, '1', '2023-09-16 14:01:23', '1', '2023-09-16 14:01:23', b'0');
610 COMMIT; 608 COMMIT;
611 609
612 -- ---------------------------- 610 -- ----------------------------
@@ -630,7 +628,7 @@ CREATE TABLE `infra_job_log` ( @@ -630,7 +628,7 @@ CREATE TABLE `infra_job_log` (
630 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 628 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
631 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 629 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
632 PRIMARY KEY (`id`) USING BTREE 630 PRIMARY KEY (`id`) USING BTREE
633 -) ENGINE = InnoDB AUTO_INCREMENT = 161 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务日志表'; 631 +) ENGINE = InnoDB AUTO_INCREMENT = 163 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务日志表';
634 632
635 -- ---------------------------- 633 -- ----------------------------
636 -- Records of infra_job_log 634 -- Records of infra_job_log
@@ -803,7 +801,7 @@ CREATE TABLE `member_level_record` ( @@ -803,7 +801,7 @@ CREATE TABLE `member_level_record` (
803 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 801 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
804 PRIMARY KEY (`id`) USING BTREE, 802 PRIMARY KEY (`id`) USING BTREE,
805 INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员等级记录-用户编号' 803 INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员等级记录-用户编号'
806 -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录'; 804 +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录';
807 805
808 -- ---------------------------- 806 -- ----------------------------
809 -- Records of member_level_record 807 -- Records of member_level_record
@@ -828,7 +826,7 @@ CREATE TABLE `member_point_config` ( @@ -828,7 +826,7 @@ CREATE TABLE `member_point_config` (
828 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 826 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
829 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 827 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
830 PRIMARY KEY (`id`) USING BTREE 828 PRIMARY KEY (`id`) USING BTREE
831 -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员积分配置表'; 829 +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员积分配置表';
832 830
833 -- ---------------------------- 831 -- ----------------------------
834 -- Records of member_point_config 832 -- Records of member_point_config
@@ -844,10 +842,10 @@ DROP TABLE IF EXISTS `member_point_record`; @@ -844,10 +842,10 @@ DROP TABLE IF EXISTS `member_point_record`;
844 CREATE TABLE `member_point_record` ( 842 CREATE TABLE `member_point_record` (
845 `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键', 843 `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
846 `user_id` bigint NOT NULL COMMENT '用户编号', 844 `user_id` bigint NOT NULL COMMENT '用户编号',
847 - `biz_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '业务编码', 845 + `biz_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '业务编码',
848 `biz_type` tinyint NOT NULL COMMENT '业务类型', 846 `biz_type` tinyint NOT NULL COMMENT '业务类型',
849 - `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '积分标题',  
850 - `description` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '积分描述', 847 + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '积分标题',
  848 + `description` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '积分描述',
851 `point` int NOT NULL COMMENT '积分', 849 `point` int NOT NULL COMMENT '积分',
852 `total_point` int NOT NULL COMMENT '变动后的积分', 850 `total_point` int NOT NULL COMMENT '变动后的积分',
853 `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', 851 `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
@@ -859,7 +857,7 @@ CREATE TABLE `member_point_record` ( @@ -859,7 +857,7 @@ CREATE TABLE `member_point_record` (
859 PRIMARY KEY (`id`) USING BTREE, 857 PRIMARY KEY (`id`) USING BTREE,
860 INDEX `index_userId`(`user_id` ASC) USING BTREE, 858 INDEX `index_userId`(`user_id` ASC) USING BTREE,
861 INDEX `index_title`(`title` ASC) USING BTREE 859 INDEX `index_title`(`title` ASC) USING BTREE
862 -) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户积分记录'; 860 +) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户积分记录';
863 861
864 -- ---------------------------- 862 -- ----------------------------
865 -- Records of member_point_record 863 -- Records of member_point_record
@@ -872,6 +870,15 @@ INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title @@ -872,6 +870,15 @@ INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title
872 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 247, 'null', 11, '订单取消', '退单获得 -18 积分', -18, 73, NULL, '2023-08-31 19:56:21', NULL, '2023-08-31 19:56:21', b'0', 1); 870 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 247, 'null', 11, '订单取消', '退单获得 -18 积分', -18, 73, NULL, '2023-08-31 19:56:21', NULL, '2023-08-31 19:56:21', b'0', 1);
873 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 247, '80', 10, '订单消费', '下单获得 2099718 积分', 2099718, 2099791, NULL, '2023-08-31 23:43:29', NULL, '2023-08-31 23:43:29', b'0', 1); 871 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 247, '80', 10, '订单消费', '下单获得 2099718 积分', 2099718, 2099791, NULL, '2023-08-31 23:43:29', NULL, '2023-08-31 23:43:29', b'0', 1);
874 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 247, '81', 10, '订单消费', '下单获得 8398818 积分', 8398818, 10498609, NULL, '2023-08-31 23:46:17', NULL, '2023-08-31 23:46:17', b'0', 1); 872 INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 247, '81', 10, '订单消费', '下单获得 8398818 积分', 8398818, 10498609, NULL, '2023-08-31 23:46:17', NULL, '2023-08-31 23:46:17', b'0', 1);
  873 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 247, '85', 12, '订单使用', '下单使用 -30 积分', -30, 10498579, '247', '2023-09-20 17:11:36', '247', '2023-09-20 17:11:36', b'0', 1);
  874 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, 247, '86', 12, '订单使用', '下单使用 -30 积分', -30, 10498549, '247', '2023-09-20 19:32:59', '247', '2023-09-20 19:32:59', b'0', 1);
  875 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (10, 247, '87', 12, '订单使用', '下单使用 -30 积分', -30, 10498519, '247', '2023-09-20 23:11:21', '247', '2023-09-20 23:11:21', b'0', 1);
  876 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (11, 247, '88', 12, '订单使用', '下单使用 -30 积分', -30, 10498489, '247', '2023-09-20 23:20:21', '247', '2023-09-20 23:20:21', b'0', 1);
  877 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (12, 247, '89', 12, '订单使用', '下单使用 -30 积分', -30, 10498459, '247', '2023-09-23 23:51:40', '247', '2023-09-23 23:51:40', b'0', 1);
  878 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (13, 247, '90', 12, '订单使用', '下单使用 -30 积分', -30, 10498429, '247', '2023-09-23 23:52:34', '247', '2023-09-23 23:52:34', b'0', 1);
  879 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (14, 247, '91', 12, '订单使用', '下单使用 -30 积分', -30, 10498399, '247', '2023-09-23 23:54:18', '247', '2023-09-23 23:54:18', b'0', 1);
  880 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 247, '92', 12, '订单使用', '下单使用 -30 积分', -30, 10498369, '247', '2023-09-23 23:55:33', '247', '2023-09-23 23:55:33', b'0', 1);
  881 +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 247, '93', 12, '订单使用', '下单使用 -30 积分', -30, 10498339, '247', '2023-09-23 23:56:53', '247', '2023-09-23 23:56:53', b'0', 1);
875 COMMIT; 882 COMMIT;
876 883
877 -- ---------------------------- 884 -- ----------------------------
@@ -890,7 +897,7 @@ CREATE TABLE `member_sign_in_config` ( @@ -890,7 +897,7 @@ CREATE TABLE `member_sign_in_config` (
890 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 897 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
891 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 898 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
892 PRIMARY KEY (`id`) USING BTREE 899 PRIMARY KEY (`id`) USING BTREE
893 -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '签到规则'; 900 +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '签到规则';
894 901
895 -- ---------------------------- 902 -- ----------------------------
896 -- Records of member_sign_in_config 903 -- Records of member_sign_in_config
@@ -919,20 +926,23 @@ CREATE TABLE `member_sign_in_record` ( @@ -919,20 +926,23 @@ CREATE TABLE `member_sign_in_record` (
919 `user_id` int NULL DEFAULT NULL COMMENT '签到用户', 926 `user_id` int NULL DEFAULT NULL COMMENT '签到用户',
920 `day` int NULL DEFAULT NULL COMMENT '第几天签到', 927 `day` int NULL DEFAULT NULL COMMENT '第几天签到',
921 `point` int NULL DEFAULT NULL COMMENT '签到的分数', 928 `point` int NULL DEFAULT NULL COMMENT '签到的分数',
922 - `create_time` datetime NULL DEFAULT NULL COMMENT '签到时间',  
923 - `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '变更时间',  
924 - `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '租户id',  
925 - `deleted` int NULL DEFAULT 0 COMMENT '是否删除',  
926 - `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',  
927 - `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', 929 + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  930 + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  931 + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  932 + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  933 + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  934 + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
928 PRIMARY KEY (`id`) USING BTREE 935 PRIMARY KEY (`id`) USING BTREE
929 -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '签到记录'; 936 +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '签到记录';
930 937
931 -- ---------------------------- 938 -- ----------------------------
932 -- Records of member_sign_in_record 939 -- Records of member_sign_in_record
933 -- ---------------------------- 940 -- ----------------------------
934 BEGIN; 941 BEGIN;
935 -INSERT INTO `member_sign_in_record` (`id`, `user_id`, `day`, `point`, `create_time`, `update_time`, `tenant_id`, `deleted`, `creator`, `updater`) VALUES (4, 247, 12, 1212, '2023-06-10 20:01:27', '2023-08-20 11:29:50', '1', 0, '1', '1'); 942 +INSERT INTO `member_sign_in_record` (`id`, `user_id`, `day`, `point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 247, 1, 123, '', '2023-09-24 01:23:47', '', '2023-09-24 01:23:47', b'0', 0);
  943 +INSERT INTO `member_sign_in_record` (`id`, `user_id`, `day`, `point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 247, 12, 12, '', '2023-09-24 01:23:47', '', '2023-09-24 01:23:47', b'0', 0);
  944 +INSERT INTO `member_sign_in_record` (`id`, `user_id`, `day`, `point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 247, 12, 1212, '', '2023-09-24 01:23:47', '', '2023-09-24 01:23:47', b'0', 0);
  945 +INSERT INTO `member_sign_in_record` (`id`, `user_id`, `day`, `point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, 247, 12, 1212, '', '2023-09-24 01:23:47', '', '2023-09-24 01:23:47', b'0', 0);
936 COMMIT; 946 COMMIT;
937 947
938 -- ---------------------------- 948 -- ----------------------------
@@ -972,7 +982,7 @@ CREATE TABLE `member_user` ( @@ -972,7 +982,7 @@ CREATE TABLE `member_user` (
972 `login_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最后登录IP', 982 `login_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最后登录IP',
973 `login_date` datetime NULL DEFAULT NULL COMMENT '最后登录时间', 983 `login_date` datetime NULL DEFAULT NULL COMMENT '最后登录时间',
974 `nickname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称', 984 `nickname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
975 - `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像', 985 + `avatar` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像',
976 `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '真实名字', 986 `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '真实名字',
977 `sex` tinyint NULL DEFAULT 0 COMMENT '用户性别', 987 `sex` tinyint NULL DEFAULT 0 COMMENT '用户性别',
978 `area_id` bigint NULL DEFAULT NULL COMMENT '所在地', 988 `area_id` bigint NULL DEFAULT NULL COMMENT '所在地',
@@ -989,9 +999,8 @@ CREATE TABLE `member_user` ( @@ -989,9 +999,8 @@ CREATE TABLE `member_user` (
989 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 999 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
990 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 1000 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
991 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 1001 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
992 - PRIMARY KEY (`id`) USING BTREE,  
993 - UNIQUE INDEX `uk_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号'  
994 -) ENGINE = InnoDB AUTO_INCREMENT = 248 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员用户'; 1002 + PRIMARY KEY (`id`) USING BTREE
  1003 +) ENGINE = InnoDB AUTO_INCREMENT = 249 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员用户';
995 1004
996 -- ---------------------------- 1005 -- ----------------------------
997 -- Records of member_user 1006 -- Records of member_user
@@ -1305,7 +1314,7 @@ CREATE TABLE `system_dict_type` ( @@ -1305,7 +1314,7 @@ CREATE TABLE `system_dict_type` (
1305 `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', 1314 `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
1306 PRIMARY KEY (`id`) USING BTREE, 1315 PRIMARY KEY (`id`) USING BTREE,
1307 UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE 1316 UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE
1308 -) ENGINE = InnoDB AUTO_INCREMENT = 176 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; 1317 +) ENGINE = InnoDB AUTO_INCREMENT = 175 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表';
1309 1318
1310 -- ---------------------------- 1319 -- ----------------------------
1311 -- Records of system_dict_type 1320 -- Records of system_dict_type
@@ -1389,7 +1398,7 @@ CREATE TABLE `system_error_code` ( @@ -1389,7 +1398,7 @@ CREATE TABLE `system_error_code` (
1389 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 1398 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
1390 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 1399 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
1391 PRIMARY KEY (`id`) USING BTREE 1400 PRIMARY KEY (`id`) USING BTREE
1392 -) ENGINE = InnoDB AUTO_INCREMENT = 5933 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '错误码表'; 1401 +) ENGINE = InnoDB AUTO_INCREMENT = 5932 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '错误码表';
1393 1402
1394 -- ---------------------------- 1403 -- ----------------------------
1395 -- Records of system_error_code 1404 -- Records of system_error_code
@@ -1418,7 +1427,7 @@ CREATE TABLE `system_login_log` ( @@ -1418,7 +1427,7 @@ CREATE TABLE `system_login_log` (
1418 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 1427 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
1419 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 1428 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
1420 PRIMARY KEY (`id`) USING BTREE 1429 PRIMARY KEY (`id`) USING BTREE
1421 -) ENGINE = InnoDB AUTO_INCREMENT = 2375 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; 1430 +) ENGINE = InnoDB AUTO_INCREMENT = 2482 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录';
1422 1431
1423 -- ---------------------------- 1432 -- ----------------------------
1424 -- Records of system_login_log 1433 -- Records of system_login_log
@@ -1483,7 +1492,7 @@ CREATE TABLE `system_mail_log` ( @@ -1483,7 +1492,7 @@ CREATE TABLE `system_mail_log` (
1483 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 1492 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
1484 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 1493 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
1485 PRIMARY KEY (`id`) USING BTREE 1494 PRIMARY KEY (`id`) USING BTREE
1486 -) ENGINE = InnoDB AUTO_INCREMENT = 354 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件日志表'; 1495 +) ENGINE = InnoDB AUTO_INCREMENT = 355 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件日志表';
1487 1496
1488 -- ---------------------------- 1497 -- ----------------------------
1489 -- Records of system_mail_log 1498 -- Records of system_mail_log
@@ -2116,7 +2125,7 @@ CREATE TABLE `system_oauth2_access_token` ( @@ -2116,7 +2125,7 @@ CREATE TABLE `system_oauth2_access_token` (
2116 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 2125 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
2117 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 2126 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
2118 PRIMARY KEY (`id`) USING BTREE 2127 PRIMARY KEY (`id`) USING BTREE
2119 -) ENGINE = InnoDB AUTO_INCREMENT = 2597 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; 2128 +) ENGINE = InnoDB AUTO_INCREMENT = 2721 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌';
2120 2129
2121 -- ---------------------------- 2130 -- ----------------------------
2122 -- Records of system_oauth2_access_token 2131 -- Records of system_oauth2_access_token
@@ -2238,7 +2247,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( @@ -2238,7 +2247,7 @@ CREATE TABLE `system_oauth2_refresh_token` (
2238 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 2247 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
2239 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 2248 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
2240 PRIMARY KEY (`id`) USING BTREE 2249 PRIMARY KEY (`id`) USING BTREE
2241 -) ENGINE = InnoDB AUTO_INCREMENT = 896 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; 2250 +) ENGINE = InnoDB AUTO_INCREMENT = 991 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌';
2242 2251
2243 -- ---------------------------- 2252 -- ----------------------------
2244 -- Records of system_oauth2_refresh_token 2253 -- Records of system_oauth2_refresh_token
@@ -2278,7 +2287,7 @@ CREATE TABLE `system_operate_log` ( @@ -2278,7 +2287,7 @@ CREATE TABLE `system_operate_log` (
2278 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 2287 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
2279 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 2288 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
2280 PRIMARY KEY (`id`) USING BTREE 2289 PRIMARY KEY (`id`) USING BTREE
2281 -) ENGINE = InnoDB AUTO_INCREMENT = 8321 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; 2290 +) ENGINE = InnoDB AUTO_INCREMENT = 8338 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录';
2282 2291
2283 -- ---------------------------- 2292 -- ----------------------------
2284 -- Records of system_operate_log 2293 -- Records of system_operate_log
@@ -3286,7 +3295,7 @@ CREATE TABLE `system_sms_code` ( @@ -3286,7 +3295,7 @@ CREATE TABLE `system_sms_code` (
3286 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 3295 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
3287 PRIMARY KEY (`id`) USING BTREE, 3296 PRIMARY KEY (`id`) USING BTREE,
3288 INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' 3297 INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号'
3289 -) ENGINE = InnoDB AUTO_INCREMENT = 501 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; 3298 +) ENGINE = InnoDB AUTO_INCREMENT = 513 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码';
3290 3299
3291 -- ---------------------------- 3300 -- ----------------------------
3292 -- Records of system_sms_code 3301 -- Records of system_sms_code
@@ -3329,7 +3338,7 @@ CREATE TABLE `system_sms_log` ( @@ -3329,7 +3338,7 @@ CREATE TABLE `system_sms_log` (
3329 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 3338 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
3330 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 3339 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
3331 PRIMARY KEY (`id`) USING BTREE 3340 PRIMARY KEY (`id`) USING BTREE
3332 -) ENGINE = InnoDB AUTO_INCREMENT = 365 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; 3341 +) ENGINE = InnoDB AUTO_INCREMENT = 381 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志';
3333 3342
3334 -- ---------------------------- 3343 -- ----------------------------
3335 -- Records of system_sms_log 3344 -- Records of system_sms_log
@@ -3401,7 +3410,7 @@ CREATE TABLE `system_social_user` ( @@ -3401,7 +3410,7 @@ CREATE TABLE `system_social_user` (
3401 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 3410 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
3402 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 3411 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
3403 PRIMARY KEY (`id`) USING BTREE 3412 PRIMARY KEY (`id`) USING BTREE
3404 -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交用户表'; 3413 +) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交用户表';
3405 3414
3406 -- ---------------------------- 3415 -- ----------------------------
3407 -- Records of system_social_user 3416 -- Records of system_social_user
@@ -3426,7 +3435,7 @@ CREATE TABLE `system_social_user_bind` ( @@ -3426,7 +3435,7 @@ CREATE TABLE `system_social_user_bind` (
3426 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', 3435 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
3427 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', 3436 `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
3428 PRIMARY KEY (`id`) USING BTREE 3437 PRIMARY KEY (`id`) USING BTREE
3429 -) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交绑定表'; 3438 +) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交绑定表';
3430 3439
3431 -- ---------------------------- 3440 -- ----------------------------
3432 -- Records of system_social_user_bind 3441 -- Records of system_social_user_bind
@@ -3462,8 +3471,8 @@ CREATE TABLE `system_tenant` ( @@ -3462,8 +3471,8 @@ CREATE TABLE `system_tenant` (
3462 -- ---------------------------- 3471 -- ----------------------------
3463 BEGIN; 3472 BEGIN;
3464 INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'https://www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2022-02-23 12:15:11', b'0'); 3473 INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'https://www.iocoder.cn', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2022-02-23 12:15:11', b'0');
3465 -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'http://www.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-07-25 23:05:38', b'0');  
3466 -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'https://www.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-07-25 23:53:16', b'0'); 3474 +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'http://www.iocoder.cn', 111, '2024-03-11 00:00:00', 20, '1', '2022-02-22 00:56:14', '1', '2023-09-16 16:59:42', b'0');
  3475 +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `domain`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'https://www.iocoder.cn', 111, '2022-04-30 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2023-09-16 16:59:27', b'0');
3467 COMMIT; 3476 COMMIT;
3468 3477
3469 -- ---------------------------- 3478 -- ----------------------------
@@ -3602,10 +3611,10 @@ CREATE TABLE `system_users` ( @@ -3602,10 +3611,10 @@ CREATE TABLE `system_users` (
3602 -- Records of system_users 3611 -- Records of system_users
3603 -- ---------------------------- 3612 -- ----------------------------
3604 BEGIN; 3613 BEGIN;
3605 -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, '0:0:0:0:0:0:0:1', '2023-09-02 00:03:37', 'admin', '2021-01-05 17:03:47', NULL, '2023-09-02 00:03:37', b'0', 1); 3614 +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, '0:0:0:0:0:0:0:1', '2023-09-24 12:03:56', 'admin', '2021-01-05 17:03:47', NULL, '2023-09-24 12:03:56', b'0', 1);
3606 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); 3615 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);
3607 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); 3616 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);
3608 -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); 3617 +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, '0:0:0:0:0:0:0:1', '2023-09-24 18:21:19', '', '2021-01-21 02:13:53', NULL, '2023-09-24 18:21:19', b'0', 1);
3609 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 (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', b'0', 118); 3618 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 (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', b'0', 118);
3610 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 (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', b'0', 119); 3619 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 (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', b'0', 119);
3611 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 (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', b'0', 120); 3620 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 (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', b'0', 120);
yudao-dependencies/pom.xml
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 14 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
15 15
16 <properties> 16 <properties>
17 - <revision>1.8.1-snapshot</revision> 17 + <revision>1.8.2-snapshot</revision>
18 <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version> 18 <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
19 <!-- 统一依赖管理 --> 19 <!-- 统一依赖管理 -->
20 <spring.boot.version>2.7.15</spring.boot.version> 20 <spring.boot.version>2.7.15</spring.boot.version>
yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/ModelUtils.java renamed to yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/BpmnModelUtils.java
1 package cn.iocoder.yudao.framework.flowable.core.util; 1 package cn.iocoder.yudao.framework.flowable.core.util;
2 2
3 -import cn.hutool.core.util.ObjectUtil;  
4 -import cn.hutool.core.util.StrUtil; 3 +import cn.hutool.core.collection.CollUtil;
5 import org.flowable.bpmn.converter.BpmnXMLConverter; 4 import org.flowable.bpmn.converter.BpmnXMLConverter;
6 import org.flowable.bpmn.model.Process; 5 import org.flowable.bpmn.model.Process;
7 import org.flowable.bpmn.model.*; 6 import org.flowable.bpmn.model.*;
8 -import org.flowable.common.engine.impl.util.io.StringStreamSource;  
9 7
10 import java.util.*; 8 import java.util.*;
11 9
12 /** 10 /**
13 * 流程模型转操作工具类 11 * 流程模型转操作工具类
14 */ 12 */
15 -public class ModelUtils { 13 +public class BpmnModelUtils {
16 14
17 /** 15 /**
18 * 根据节点,获取入口连线 16 * 根据节点,获取入口连线
@@ -21,14 +19,12 @@ public class ModelUtils { @@ -21,14 +19,12 @@ public class ModelUtils {
21 * @return 入口连线列表 19 * @return 入口连线列表
22 */ 20 */
23 public static List<SequenceFlow> getElementIncomingFlows(FlowElement source) { 21 public static List<SequenceFlow> getElementIncomingFlows(FlowElement source) {
24 - List<SequenceFlow> sequenceFlows = new ArrayList<>();  
25 if (source instanceof FlowNode) { 22 if (source instanceof FlowNode) {
26 - sequenceFlows = ((FlowNode) source).getIncomingFlows(); 23 + return ((FlowNode) source).getIncomingFlows();
27 } 24 }
28 - return sequenceFlows; 25 + return new ArrayList<>();
29 } 26 }
30 27
31 -  
32 /** 28 /**
33 * 根据节点,获取出口连线 29 * 根据节点,获取出口连线
34 * 30 *
@@ -36,19 +32,17 @@ public class ModelUtils { @@ -36,19 +32,17 @@ public class ModelUtils {
36 * @return 出口连线列表 32 * @return 出口连线列表
37 */ 33 */
38 public static List<SequenceFlow> getElementOutgoingFlows(FlowElement source) { 34 public static List<SequenceFlow> getElementOutgoingFlows(FlowElement source) {
39 - List<SequenceFlow> sequenceFlows = new ArrayList<>();  
40 if (source instanceof FlowNode) { 35 if (source instanceof FlowNode) {
41 - sequenceFlows = ((FlowNode) source).getOutgoingFlows(); 36 + return ((FlowNode) source).getOutgoingFlows();
42 } 37 }
43 - return sequenceFlows; 38 + return new ArrayList<>();
44 } 39 }
45 40
46 -  
47 /** 41 /**
48 * 获取流程元素信息 42 * 获取流程元素信息
49 * 43 *
50 - * @param model bpmnModel对象  
51 - * @param flowElementId 元素ID 44 + * @param model bpmnModel 对象
  45 + * @param flowElementId 元素 ID
52 * @return 元素信息 46 * @return 元素信息
53 */ 47 */
54 public static FlowElement getFlowElementById(BpmnModel model, String flowElementId) { 48 public static FlowElement getFlowElementById(BpmnModel model, String flowElementId) {
@@ -56,6 +50,48 @@ public class ModelUtils { @@ -56,6 +50,48 @@ public class ModelUtils {
56 return process.getFlowElement(flowElementId); 50 return process.getFlowElement(flowElementId);
57 } 51 }
58 52
  53 + /**
  54 + * 获得 BPMN 流程中,指定的元素们
  55 + *
  56 + * @param model
  57 + * @param clazz 指定元素。例如说,{@link UserTask}、{@link Gateway} 等等
  58 + * @return 元素们
  59 + */
  60 + public static <T extends FlowElement> List<T> getBpmnModelElements(BpmnModel model, Class<T> clazz) {
  61 + List<T> result = new ArrayList<>();
  62 + model.getProcesses().forEach(process -> {
  63 + process.getFlowElements().forEach(flowElement -> {
  64 + if (flowElement.getClass().isAssignableFrom(clazz)) {
  65 + result.add((T) flowElement);
  66 + }
  67 + });
  68 + });
  69 + return result;
  70 + }
  71 +
  72 + /**
  73 + * 比较 两个bpmnModel 是否相同
  74 + * @param oldModel 老的bpmn model
  75 + * @param newModel 新的bpmn model
  76 + */
  77 + public static boolean equals(BpmnModel oldModel, BpmnModel newModel) {
  78 + // 由于 BpmnModel 未提供 equals 方法,所以只能转成字节数组,进行比较
  79 + return Arrays.equals(getBpmnBytes(oldModel), getBpmnBytes(newModel));
  80 + }
  81 +
  82 + /**
  83 + * 把 bpmnModel 转换成 byte[]
  84 + * @param model bpmnModel
  85 + */
  86 + public static byte[] getBpmnBytes(BpmnModel model) {
  87 + if (model == null) {
  88 + return new byte[0];
  89 + }
  90 + BpmnXMLConverter converter = new BpmnXMLConverter();
  91 + return converter.convertToXML(model);
  92 + }
  93 +
  94 + // ========== 遍历相关的方法 ==========
59 95
60 /** 96 /**
61 * 找到 source 节点之前的所有用户任务节点 97 * 找到 source 节点之前的所有用户任务节点
@@ -63,45 +99,44 @@ public class ModelUtils { @@ -63,45 +99,44 @@ public class ModelUtils {
63 * @param source 起始节点 99 * @param source 起始节点
64 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复 100 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复
65 * @param userTaskList 已找到的用户任务节点 101 * @param userTaskList 已找到的用户任务节点
66 - * @return 102 + * @return 用户任务节点 数组
67 */ 103 */
68 - public static List<UserTask> getPreUserTaskList(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) { 104 + public static List<UserTask> getPreviousUserTaskList(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) {
69 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList; 105 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList;
70 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; 106 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow;
71 -  
72 // 如果该节点为开始节点,且存在上级子节点,则顺着上级子节点继续迭代 107 // 如果该节点为开始节点,且存在上级子节点,则顺着上级子节点继续迭代
73 if (source instanceof StartEvent && source.getSubProcess() != null) { 108 if (source instanceof StartEvent && source.getSubProcess() != null) {
74 - userTaskList = getPreUserTaskList(source.getSubProcess(), hasSequenceFlow, userTaskList); 109 + userTaskList = getPreviousUserTaskList(source.getSubProcess(), hasSequenceFlow, userTaskList);
75 } 110 }
76 111
77 // 根据类型,获取入口连线 112 // 根据类型,获取入口连线
78 List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); 113 List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source);
79 -  
80 - if (sequenceFlows != null) {  
81 - // 循环找到目标元素  
82 - for (SequenceFlow sequenceFlow : sequenceFlows) {  
83 - // 如果发现连线重复,说明循环了,跳过这个循环  
84 - if (hasSequenceFlow.contains(sequenceFlow.getId())) {  
85 - continue;  
86 - }  
87 - // 添加已经走过的连线  
88 - hasSequenceFlow.add(sequenceFlow.getId());  
89 - // 类型为用户节点,则新增父级节点  
90 - if (sequenceFlow.getSourceFlowElement() instanceof UserTask) {  
91 - userTaskList.add((UserTask) sequenceFlow.getSourceFlowElement());  
92 - }  
93 - // 类型为子流程,则添加子流程开始节点出口处相连的节点  
94 - if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) {  
95 - // 获取子流程用户任务节点  
96 - List<UserTask> childUserTaskList = findChildProcessUserTasks((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, null);  
97 - // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续  
98 - if (childUserTaskList != null && childUserTaskList.size() > 0) {  
99 - userTaskList.addAll(childUserTaskList);  
100 - } 114 + if (sequenceFlows == null) {
  115 + return userTaskList;
  116 + }
  117 + // 循环找到目标元素
  118 + for (SequenceFlow sequenceFlow : sequenceFlows) {
  119 + // 如果发现连线重复,说明循环了,跳过这个循环
  120 + if (hasSequenceFlow.contains(sequenceFlow.getId())) {
  121 + continue;
  122 + }
  123 + // 添加已经走过的连线
  124 + hasSequenceFlow.add(sequenceFlow.getId());
  125 + // 类型为用户节点,则新增父级节点
  126 + if (sequenceFlow.getSourceFlowElement() instanceof UserTask) {
  127 + userTaskList.add((UserTask) sequenceFlow.getSourceFlowElement());
  128 + }
  129 + // 类型为子流程,则添加子流程开始节点出口处相连的节点
  130 + if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) {
  131 + // 获取子流程用户任务节点
  132 + List<UserTask> childUserTaskList = findChildProcessUserTaskList((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, null);
  133 + // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
  134 + if (CollUtil.isNotEmpty(childUserTaskList)) {
  135 + userTaskList.addAll(childUserTaskList);
101 } 136 }
102 - // 继续迭代  
103 - userTaskList = getPreUserTaskList(sequenceFlow.getSourceFlowElement(), hasSequenceFlow, userTaskList);  
104 } 137 }
  138 + // 继续迭代
  139 + userTaskList = getPreviousUserTaskList(sequenceFlow.getSourceFlowElement(), hasSequenceFlow, userTaskList);
105 } 140 }
106 return userTaskList; 141 return userTaskList;
107 } 142 }
@@ -112,41 +147,41 @@ public class ModelUtils { @@ -112,41 +147,41 @@ public class ModelUtils {
112 * @param source 起始节点 147 * @param source 起始节点
113 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复 148 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复
114 * @param userTaskList 需要撤回的用户任务列表 149 * @param userTaskList 需要撤回的用户任务列表
115 - * @return 150 + * @return 用户任务节点
116 */ 151 */
117 - public static List<UserTask> findChildProcessUserTasks(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) { 152 + public static List<UserTask> findChildProcessUserTaskList(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) {
118 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; 153 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow;
119 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList; 154 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList;
120 155
121 // 根据类型,获取出口连线 156 // 根据类型,获取出口连线
122 List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); 157 List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source);
123 -  
124 - if (sequenceFlows != null) {  
125 - // 循环找到目标元素  
126 - for (SequenceFlow sequenceFlow : sequenceFlows) {  
127 - // 如果发现连线重复,说明循环了,跳过这个循环  
128 - if (hasSequenceFlow.contains(sequenceFlow.getId())) {  
129 - continue;  
130 - }  
131 - // 添加已经走过的连线  
132 - hasSequenceFlow.add(sequenceFlow.getId());  
133 - // 如果为用户任务类型,且任务节点的 Key 正在运行的任务中存在,添加  
134 - if (sequenceFlow.getTargetFlowElement() instanceof UserTask) {  
135 - userTaskList.add((UserTask) sequenceFlow.getTargetFlowElement()); 158 + if (sequenceFlows == null) {
  159 + return userTaskList;
  160 + }
  161 + // 循环找到目标元素
  162 + for (SequenceFlow sequenceFlow : sequenceFlows) {
  163 + // 如果发现连线重复,说明循环了,跳过这个循环
  164 + if (hasSequenceFlow.contains(sequenceFlow.getId())) {
  165 + continue;
  166 + }
  167 + // 添加已经走过的连线
  168 + hasSequenceFlow.add(sequenceFlow.getId());
  169 + // 如果为用户任务类型,且任务节点的 Key 正在运行的任务中存在,添加
  170 + if (sequenceFlow.getTargetFlowElement() instanceof UserTask) {
  171 + userTaskList.add((UserTask) sequenceFlow.getTargetFlowElement());
  172 + continue;
  173 + }
  174 + // 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
  175 + if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
  176 + List<UserTask> childUserTaskList = findChildProcessUserTaskList((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, null);
  177 + // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
  178 + if (CollUtil.isNotEmpty(childUserTaskList)) {
  179 + userTaskList.addAll(childUserTaskList);
136 continue; 180 continue;
137 } 181 }
138 - // 如果节点为子流程节点情况,则从节点中的第一个节点开始获取  
139 - if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {  
140 - List<UserTask> childUserTaskList = findChildProcessUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, null);  
141 - // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续  
142 - if (childUserTaskList != null && childUserTaskList.size() > 0) {  
143 - userTaskList.addAll(childUserTaskList);  
144 - continue;  
145 - }  
146 - }  
147 - // 继续迭代  
148 - userTaskList = findChildProcessUserTasks(sequenceFlow.getTargetFlowElement(), hasSequenceFlow, userTaskList);  
149 } 182 }
  183 + // 继续迭代
  184 + userTaskList = findChildProcessUserTaskList(sequenceFlow.getTargetFlowElement(), hasSequenceFlow, userTaskList);
150 } 185 }
151 return userTaskList; 186 return userTaskList;
152 } 187 }
@@ -163,36 +198,36 @@ public class ModelUtils { @@ -163,36 +198,36 @@ public class ModelUtils {
163 */ 198 */
164 public static boolean isSequentialReachable(FlowElement source, FlowElement target, Set<String> visitedElements) { 199 public static boolean isSequentialReachable(FlowElement source, FlowElement target, Set<String> visitedElements) {
165 visitedElements = visitedElements == null ? new HashSet<>() : visitedElements; 200 visitedElements = visitedElements == null ? new HashSet<>() : visitedElements;
166 - //不能是开始事件和子流程 201 + // 不能是开始事件和子流程
167 if (source instanceof StartEvent && isInEventSubprocess(source)) { 202 if (source instanceof StartEvent && isInEventSubprocess(source)) {
168 return false; 203 return false;
169 } 204 }
170 205
171 // 根据类型,获取入口连线 206 // 根据类型,获取入口连线
172 List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); 207 List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source);
173 - if (sequenceFlows != null && sequenceFlows.size() > 0) {  
174 - // 循环找到目标元素  
175 - for (SequenceFlow sequenceFlow : sequenceFlows) {  
176 - // 如果发现连线重复,说明循环了,跳过这个循环  
177 - if (visitedElements.contains(sequenceFlow.getId())) {  
178 - continue;  
179 - }  
180 - // 添加已经走过的连线  
181 - visitedElements.add(sequenceFlow.getId());  
182 - FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();  
183 - // 这条线路存在目标节点,这条线路完成,进入下个线路  
184 - if (target.getId().equals(sourceFlowElement.getId())) {  
185 - continue;  
186 - }  
187 - // 如果目标节点为并行网关,则不继续  
188 - if (sourceFlowElement instanceof ParallelGateway) {  
189 - return false;  
190 - }  
191 - // 否则就继续迭代  
192 - boolean isSequential = isSequentialReachable(sourceFlowElement, target, visitedElements);  
193 - if (!isSequential) {  
194 - return false;  
195 - } 208 + if (CollUtil.isEmpty(sequenceFlows)) {
  209 + return true;
  210 + }
  211 + // 循环找到目标元素
  212 + for (SequenceFlow sequenceFlow : sequenceFlows) {
  213 + // 如果发现连线重复,说明循环了,跳过这个循环
  214 + if (visitedElements.contains(sequenceFlow.getId())) {
  215 + continue;
  216 + }
  217 + // 添加已经走过的连线
  218 + visitedElements.add(sequenceFlow.getId());
  219 + // 这条线路存在目标节点,这条线路完成,进入下个线路
  220 + FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();
  221 + if (target.getId().equals(sourceFlowElement.getId())) {
  222 + continue;
  223 + }
  224 + // 如果目标节点为并行网关,则不继续
  225 + if (sourceFlowElement instanceof ParallelGateway) {
  226 + return false;
  227 + }
  228 + // 否则就继续迭代
  229 + if (!isSequentialReachable(sourceFlowElement, target, visitedElements)) {
  230 + return false;
196 } 231 }
197 } 232 }
198 return true; 233 return true;
@@ -202,9 +237,9 @@ public class ModelUtils { @@ -202,9 +237,9 @@ public class ModelUtils {
202 * 判断当前节点是否属于不同的子流程 237 * 判断当前节点是否属于不同的子流程
203 * 238 *
204 * @param flowElement 被判断的节点 239 * @param flowElement 被判断的节点
205 - * @return true表示属于子流程 240 + * @return true 表示属于子流程
206 */ 241 */
207 - protected static boolean isInEventSubprocess(FlowElement flowElement) { 242 + private static boolean isInEventSubprocess(FlowElement flowElement) {
208 FlowElementsContainer flowElementsContainer = flowElement.getParentContainer(); 243 FlowElementsContainer flowElementsContainer = flowElement.getParentContainer();
209 while (flowElementsContainer != null) { 244 while (flowElementsContainer != null) {
210 if (flowElementsContainer instanceof EventSubProcess) { 245 if (flowElementsContainer instanceof EventSubProcess) {
@@ -220,7 +255,6 @@ public class ModelUtils { @@ -220,7 +255,6 @@ public class ModelUtils {
220 return false; 255 return false;
221 } 256 }
222 257
223 -  
224 /** 258 /**
225 * 根据正在运行的任务节点,迭代获取子级任务节点列表,向后找 259 * 根据正在运行的任务节点,迭代获取子级任务节点列表,向后找
226 * 260 *
@@ -228,12 +262,12 @@ public class ModelUtils { @@ -228,12 +262,12 @@ public class ModelUtils {
228 * @param runTaskKeyList 正在运行的任务 Key,用于校验任务节点是否是正在运行的节点 262 * @param runTaskKeyList 正在运行的任务 Key,用于校验任务节点是否是正在运行的节点
229 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复 263 * @param hasSequenceFlow 已经经过的连线的 ID,用于判断线路是否重复
230 * @param userTaskList 需要撤回的用户任务列表 264 * @param userTaskList 需要撤回的用户任务列表
231 - * @return 265 + * @return 子级任务节点列表
232 */ 266 */
233 - public static List<UserTask> iteratorFindChildUserTasks(FlowElement source, List<String> runTaskKeyList, Set<String> hasSequenceFlow, List<UserTask> userTaskList) { 267 + public static List<UserTask> iteratorFindChildUserTasks(FlowElement source, List<String> runTaskKeyList,
  268 + Set<String> hasSequenceFlow, List<UserTask> userTaskList) {
234 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; 269 hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow;
235 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList; 270 userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList;
236 -  
237 // 如果该节点为开始节点,且存在上级子节点,则顺着上级子节点继续迭代 271 // 如果该节点为开始节点,且存在上级子节点,则顺着上级子节点继续迭代
238 if (source instanceof StartEvent && source.getSubProcess() != null) { 272 if (source instanceof StartEvent && source.getSubProcess() != null) {
239 userTaskList = iteratorFindChildUserTasks(source.getSubProcess(), runTaskKeyList, hasSequenceFlow, userTaskList); 273 userTaskList = iteratorFindChildUserTasks(source.getSubProcess(), runTaskKeyList, hasSequenceFlow, userTaskList);
@@ -241,34 +275,35 @@ public class ModelUtils { @@ -241,34 +275,35 @@ public class ModelUtils {
241 275
242 // 根据类型,获取出口连线 276 // 根据类型,获取出口连线
243 List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); 277 List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source);
244 -  
245 - if (sequenceFlows != null) {  
246 - // 循环找到目标元素  
247 - for (SequenceFlow sequenceFlow : sequenceFlows) {  
248 - // 如果发现连线重复,说明循环了,跳过这个循环  
249 - if (hasSequenceFlow.contains(sequenceFlow.getId())) {  
250 - continue;  
251 - }  
252 - // 添加已经走过的连线  
253 - hasSequenceFlow.add(sequenceFlow.getId());  
254 - // 如果为用户任务类型,且任务节点的 Key 正在运行的任务中存在,添加  
255 - if (sequenceFlow.getTargetFlowElement() instanceof UserTask && runTaskKeyList.contains((sequenceFlow.getTargetFlowElement()).getId())) {  
256 - userTaskList.add((UserTask) sequenceFlow.getTargetFlowElement()); 278 + if (sequenceFlows == null) {
  279 + return userTaskList;
  280 + }
  281 + // 循环找到目标元素
  282 + for (SequenceFlow sequenceFlow : sequenceFlows) {
  283 + // 如果发现连线重复,说明循环了,跳过这个循环
  284 + if (hasSequenceFlow.contains(sequenceFlow.getId())) {
  285 + continue;
  286 + }
  287 + // 添加已经走过的连线
  288 + hasSequenceFlow.add(sequenceFlow.getId());
  289 + // 如果为用户任务类型,且任务节点的 Key 正在运行的任务中存在,添加
  290 + if (sequenceFlow.getTargetFlowElement() instanceof UserTask && runTaskKeyList.contains((sequenceFlow.getTargetFlowElement()).getId())) {
  291 + userTaskList.add((UserTask) sequenceFlow.getTargetFlowElement());
  292 + continue;
  293 + }
  294 + // 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
  295 + if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
  296 + List<UserTask> childUserTaskList = iteratorFindChildUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), runTaskKeyList, hasSequenceFlow, null);
  297 + // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
  298 + if (CollUtil.isNotEmpty(childUserTaskList)) {
  299 + userTaskList.addAll(childUserTaskList);
257 continue; 300 continue;
258 } 301 }
259 - // 如果节点为子流程节点情况,则从节点中的第一个节点开始获取  
260 - if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {  
261 - List<UserTask> childUserTaskList = iteratorFindChildUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), runTaskKeyList, hasSequenceFlow, null);  
262 - // 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续  
263 - if (childUserTaskList != null && childUserTaskList.size() > 0) {  
264 - userTaskList.addAll(childUserTaskList);  
265 - continue;  
266 - }  
267 - }  
268 - // 继续迭代  
269 - userTaskList = iteratorFindChildUserTasks(sequenceFlow.getTargetFlowElement(), runTaskKeyList, hasSequenceFlow, userTaskList);  
270 } 302 }
  303 + // 继续迭代
  304 + userTaskList = iteratorFindChildUserTasks(sequenceFlow.getTargetFlowElement(), runTaskKeyList, hasSequenceFlow, userTaskList);
271 } 305 }
272 return userTaskList; 306 return userTaskList;
273 } 307 }
  308 +
274 } 309 }
yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/util/FlowableUtils.java
1 package cn.iocoder.yudao.framework.flowable.core.util; 1 package cn.iocoder.yudao.framework.flowable.core.util;
2 2
3 -import org.flowable.bpmn.converter.BpmnXMLConverter;  
4 -import org.flowable.bpmn.model.BpmnModel;  
5 -import org.flowable.bpmn.model.FlowElement;  
6 import org.flowable.common.engine.impl.identity.Authentication; 3 import org.flowable.common.engine.impl.identity.Authentication;
7 4
8 -import java.util.ArrayList;  
9 -import java.util.Arrays;  
10 -import java.util.List;  
11 -  
12 /** 5 /**
13 * Flowable 相关的工具方法 6 * Flowable 相关的工具方法
14 * 7 *
@@ -26,49 +19,6 @@ public class FlowableUtils { @@ -26,49 +19,6 @@ public class FlowableUtils {
26 Authentication.setAuthenticatedUserId(null); 19 Authentication.setAuthenticatedUserId(null);
27 } 20 }
28 21
29 - // ========== BPMN 相关的工具方法 ==========  
30 -  
31 - /**  
32 - * 获得 BPMN 流程中,指定的元素们  
33 - *  
34 - * @param model  
35 - * @param clazz 指定元素。例如说,{@link org.flowable.bpmn.model.UserTask}、{@link org.flowable.bpmn.model.Gateway} 等等  
36 - * @return 元素们  
37 - */  
38 - public static <T extends FlowElement> List<T> getBpmnModelElements(BpmnModel model, Class<T> clazz) {  
39 - List<T> result = new ArrayList<>();  
40 - model.getProcesses().forEach(process -> {  
41 - process.getFlowElements().forEach(flowElement -> {  
42 - if (flowElement.getClass().isAssignableFrom(clazz)) {  
43 - result.add((T) flowElement);  
44 - }  
45 - });  
46 - });  
47 - return result;  
48 - }  
49 -  
50 - /**  
51 - * 比较 两个bpmnModel 是否相同  
52 - * @param oldModel 老的bpmn model  
53 - * @param newModel 新的bpmn model  
54 - */  
55 - public static boolean equals(BpmnModel oldModel, BpmnModel newModel) {  
56 - // 由于 BpmnModel 未提供 equals 方法,所以只能转成字节数组,进行比较  
57 - return Arrays.equals(getBpmnBytes(oldModel), getBpmnBytes(newModel));  
58 - }  
59 -  
60 - /**  
61 - * 把 bpmnModel 转换成 byte[]  
62 - * @param model bpmnModel  
63 - */  
64 - public static byte[] getBpmnBytes(BpmnModel model) {  
65 - if (model == null) {  
66 - return new byte[0];  
67 - }  
68 - BpmnXMLConverter converter = new BpmnXMLConverter();  
69 - return converter.convertToXML(model);  
70 - }  
71 -  
72 // ========== Execution 相关的工具方法 ========== 22 // ========== Execution 相关的工具方法 ==========
73 23
74 public static String formatCollectionVariable(String activityId) { 24 public static String formatCollectionVariable(String activityId) {
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java
@@ -47,11 +47,10 @@ public interface ErrorCodeConstants { @@ -47,11 +47,10 @@ public interface ErrorCodeConstants {
47 ErrorCode TASK_COMPLETE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "审批任务失败,原因:该任务的审批人不是你"); 47 ErrorCode TASK_COMPLETE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "审批任务失败,原因:该任务的审批人不是你");
48 ErrorCode TASK_NOT_EXISTS = new ErrorCode(1_009_005_002, "流程任务不存在"); 48 ErrorCode TASK_NOT_EXISTS = new ErrorCode(1_009_005_002, "流程任务不存在");
49 ErrorCode TASK_IS_PENDING = new ErrorCode(1_009_005_003, "当前任务处于挂起状态,不能操作"); 49 ErrorCode TASK_IS_PENDING = new ErrorCode(1_009_005_003, "当前任务处于挂起状态,不能操作");
50 - ErrorCode TASK_SOURCE_TARGET_ERROR = new ErrorCode(1_009_005_004, "目标节点是在并行网关上或非同一路线上,不可跳转");  
51 - ErrorCode TASK_TARGET_NODE_NOT_EXISTS = new ErrorCode(1_009_005_005, " 目标节点不存在");  
52 - ErrorCode TASK_RETURN_FAIL = new ErrorCode(1_009_005_006, "回退任务失败,选择回退的节点没有需要回滚的任务!请重新选择其他任务节点");  
53 - ErrorCode TASK_DELEGATE_APPROVE_FAIL = new ErrorCode(1_009_005_007, "任务审批失败:委派任务找不到原审批人");  
54 - ErrorCode TASK_DELEGATE_USER_REPEAT = new ErrorCode(1_009_005_008, "任务委派失败,委派人和当前审批人为同一人"); 50 + ErrorCode TASK_TARGET_NODE_NOT_EXISTS = new ErrorCode(1_009_005_004, " 目标节点不存在");
  51 + ErrorCode TASK_RETURN_FAIL_NO_RETURN_TASK = new ErrorCode(1_009_005_005, "回退任务失败,选择回退的节点没有需要回滚的任务!请重新选择其他任务节点");
  52 + ErrorCode TASK_RETURN_FAIL_SOURCE_TARGET_ERROR = new ErrorCode(1_009_005_006, "回退任务失败,目标节点是在并行网关上或非同一路线上,不可跳转");
  53 +
55 // ========== 流程任务分配规则 1-009-006-000 ========== 54 // ========== 流程任务分配规则 1-009-006-000 ==========
56 ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1_009_006_000, "流程({}) 的任务({}) 已经存在分配规则"); 55 ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1_009_006_000, "流程({}) 的任务({}) 已经存在分配规则");
57 ErrorCode TASK_ASSIGN_RULE_NOT_EXISTS = new ErrorCode(1_009_006_001, "流程任务分配规则不存在"); 56 ErrorCode TASK_ASSIGN_RULE_NOT_EXISTS = new ErrorCode(1_009_006_001, "流程任务分配规则不存在");
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
@@ -78,14 +78,14 @@ public class BpmTaskController { @@ -78,14 +78,14 @@ public class BpmTaskController {
78 @GetMapping("/get-return-list") 78 @GetMapping("/get-return-list")
79 @Operation(summary = "获取所有可回退的节点", description = "用于【流程详情】的【回退】按钮") 79 @Operation(summary = "获取所有可回退的节点", description = "用于【流程详情】的【回退】按钮")
80 @Parameter(name = "taskId", description = "当前任务ID", required = true) 80 @Parameter(name = "taskId", description = "当前任务ID", required = true)
81 - @PreAuthorize("@ss.hasPermission('bpm:task:return')") 81 + @PreAuthorize("@ss.hasPermission('bpm:task:update')")
82 public CommonResult<List<BpmTaskSimpleRespVO>> getReturnList(@RequestParam("taskId") String taskId) { 82 public CommonResult<List<BpmTaskSimpleRespVO>> getReturnList(@RequestParam("taskId") String taskId) {
83 return success(taskService.getReturnTaskList(taskId)); 83 return success(taskService.getReturnTaskList(taskId));
84 } 84 }
85 85
86 @PutMapping("/return") 86 @PutMapping("/return")
87 @Operation(summary = "回退任务", description = "用于【流程详情】的【回退】按钮") 87 @Operation(summary = "回退任务", description = "用于【流程详情】的【回退】按钮")
88 - @PreAuthorize("@ss.hasPermission('bpm:task:return')") 88 + @PreAuthorize("@ss.hasPermission('bpm:task:update')")
89 public CommonResult<Boolean> returnTask(@Valid @RequestBody BpmTaskReturnReqVO reqVO) { 89 public CommonResult<Boolean> returnTask(@Valid @RequestBody BpmTaskReturnReqVO reqVO) {
90 taskService.returnTask(reqVO); 90 taskService.returnTask(reqVO);
91 return success(true); 91 return success(true);
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java
@@ -14,10 +14,11 @@ public class BpmTaskReturnReqVO { @@ -14,10 +14,11 @@ public class BpmTaskReturnReqVO {
14 private String id; 14 private String id;
15 15
16 @Schema(description = "回退到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") 16 @Schema(description = "回退到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
17 - @NotEmpty(message = "回退到的任务Key不能为空") 17 + @NotEmpty(message = "回退到的任务 Key 不能为空")
18 private String targetDefinitionKey; 18 private String targetDefinitionKey;
19 19
20 - @Schema(description = "回退意见", example = "") 20 + @Schema(description = "回退意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "我就是想驳回")
  21 + @NotEmpty(message = "回退意见不能为空")
21 private String reason; 22 private String reason;
22 23
23 } 24 }
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSimpleRespVO.java
@@ -3,10 +3,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; @@ -3,10 +3,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
5 5
6 -/**  
7 - *  
8 - */  
9 -@Schema(description = "管理后台 - 流程任务的 可回退的节点 Response VO") 6 +@Schema(description = "管理后台 - 流程任务的精简 Response VO")
10 @Data 7 @Data
11 public class BpmTaskSimpleRespVO { 8 public class BpmTaskSimpleRespVO {
12 9
@@ -15,4 +12,5 @@ public class BpmTaskSimpleRespVO { @@ -15,4 +12,5 @@ public class BpmTaskSimpleRespVO {
15 12
16 @Schema(description = "任务名词", requiredMode = Schema.RequiredMode.REQUIRED, example = "经理审批") 13 @Schema(description = "任务名词", requiredMode = Schema.RequiredMode.REQUIRED, example = "经理审批")
17 private String name; 14 private String name;
  15 +
18 } 16 }
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java
@@ -140,8 +140,7 @@ public interface BpmTaskConvert { @@ -140,8 +140,7 @@ public interface BpmTaskConvert {
140 return reqDTO; 140 return reqDTO;
141 } 141 }
142 142
143 - @Mapping(source = "taskDefinitionKey", target = "id")  
144 - default List<BpmTaskSimpleRespVO> convertList(List<FlowElement> elementList) { 143 + default List<BpmTaskSimpleRespVO> convertList(List<? extends FlowElement> elementList) {
145 return CollectionUtils.convertList(elementList, element -> new BpmTaskSimpleRespVO() 144 return CollectionUtils.convertList(elementList, element -> new BpmTaskSimpleRespVO()
146 .setName(element.getName()) 145 .setName(element.getName())
147 .setDefinitionKey(element.getId())); 146 .setDefinitionKey(element.getId()));
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java
@@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil; @@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
5 import cn.hutool.core.util.StrUtil; 5 import cn.hutool.core.util.StrUtil;
6 import cn.iocoder.yudao.framework.common.pojo.PageResult; 6 import cn.iocoder.yudao.framework.common.pojo.PageResult;
7 import cn.iocoder.yudao.framework.common.util.object.PageUtils; 7 import cn.iocoder.yudao.framework.common.util.object.PageUtils;
8 -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; 8 +import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils;
9 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; 9 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO;
10 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; 10 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO;
11 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; 11 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO;
@@ -200,7 +200,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ @@ -200,7 +200,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ
200 BpmnModel newModel = buildBpmnModel(createReqDTO.getBpmnBytes()); 200 BpmnModel newModel = buildBpmnModel(createReqDTO.getBpmnBytes());
201 BpmnModel oldModel = getBpmnModel(oldProcessDefinition.getId()); 201 BpmnModel oldModel = getBpmnModel(oldProcessDefinition.getId());
202 // 对比字节变化 202 // 对比字节变化
203 - if (!FlowableUtils.equals(oldModel, newModel)) { 203 + if (!BpmnModelUtils.equals(oldModel, newModel)) {
204 return false; 204 return false;
205 } 205 }
206 // 最终发现都一致,则返回 true 206 // 最终发现都一致,则返回 true
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java
@@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
7 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; 7 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
8 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; 8 import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
9 import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; 9 import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
10 -import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; 10 +import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils;
11 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; 11 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO;
12 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; 12 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO;
13 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; 13 import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO;
@@ -114,7 +114,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { @@ -114,7 +114,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
114 return Collections.emptyList(); 114 return Collections.emptyList();
115 } 115 }
116 // 获得用户任务,只有用户任务才可以设置分配规则 116 // 获得用户任务,只有用户任务才可以设置分配规则
117 - List<UserTask> userTasks = FlowableUtils.getBpmnModelElements(model, UserTask.class); 117 + List<UserTask> userTasks = BpmnModelUtils.getBpmnModelElements(model, UserTask.class);
118 if (CollUtil.isEmpty(userTasks)) { 118 if (CollUtil.isEmpty(userTasks)) {
119 return Collections.emptyList(); 119 return Collections.emptyList();
120 } 120 }
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskService.java
@@ -125,7 +125,7 @@ public interface BpmTaskService { @@ -125,7 +125,7 @@ public interface BpmTaskService {
125 /** 125 /**
126 * 获取当前任务的可回退的流程集合 126 * 获取当前任务的可回退的流程集合
127 * 127 *
128 - * @param taskId 当前的任务ID 128 + * @param taskId 当前的任务 ID
129 * @return 可以回退的节点列表 129 * @return 可以回退的节点列表
130 */ 130 */
131 List<BpmTaskSimpleRespVO> getReturnTaskList(String taskId); 131 List<BpmTaskSimpleRespVO> getReturnTaskList(String taskId);
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
@@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
8 import cn.iocoder.yudao.framework.common.util.date.DateUtils; 8 import cn.iocoder.yudao.framework.common.util.date.DateUtils;
9 import cn.iocoder.yudao.framework.common.util.number.NumberUtils; 9 import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
10 import cn.iocoder.yudao.framework.common.util.object.PageUtils; 10 import cn.iocoder.yudao.framework.common.util.object.PageUtils;
11 -import cn.iocoder.yudao.framework.flowable.core.util.ModelUtils; 11 +import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils;
12 import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; 12 import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
13 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; 13 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
14 import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; 14 import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
@@ -65,22 +65,23 @@ public class BpmTaskServiceImpl implements BpmTaskService { @@ -65,22 +65,23 @@ public class BpmTaskServiceImpl implements BpmTaskService {
65 private TaskService taskService; 65 private TaskService taskService;
66 @Resource 66 @Resource
67 private HistoryService historyService; 67 private HistoryService historyService;
  68 + @Resource
  69 + private RuntimeService runtimeService;
68 70
69 @Resource 71 @Resource
70 private BpmProcessInstanceService processInstanceService; 72 private BpmProcessInstanceService processInstanceService;
71 @Resource 73 @Resource
72 - private AdminUserApi adminUserApi;  
73 - @Resource  
74 - private DeptApi deptApi;  
75 - @Resource  
76 - private BpmTaskExtMapper taskExtMapper; 74 + private BpmModelService bpmModelService;
77 @Resource 75 @Resource
78 private BpmMessageService messageService; 76 private BpmMessageService messageService;
  77 +
79 @Resource 78 @Resource
80 - private BpmModelService bpmModelService; 79 + private AdminUserApi adminUserApi;
81 @Resource 80 @Resource
82 - private RuntimeService runtimeService; 81 + private DeptApi deptApi;
83 82
  83 + @Resource
  84 + private BpmTaskExtMapper taskExtMapper;
84 85
85 @Override 86 @Override
86 public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) { 87 public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) {
@@ -359,144 +360,127 @@ public class BpmTaskServiceImpl implements BpmTaskService { @@ -359,144 +360,127 @@ public class BpmTaskServiceImpl implements BpmTaskService {
359 return task; 360 return task;
360 } 361 }
361 362
  363 + /**
  364 + * 校验任务是否合法
  365 + *
  366 + * @param taskId 任务编号
  367 + * @return 任务
  368 + */
  369 + private Task validateTask(String taskId) {
  370 + // 当前任务 task
  371 + Task task = getTask(taskId);
  372 + if (task == null) {
  373 + throw exception(TASK_NOT_EXISTS);
  374 + }
  375 + if (task.isSuspended()) {
  376 + throw exception(TASK_IS_PENDING);
  377 + }
  378 + return task;
  379 + }
  380 +
362 private HistoricTaskInstance getHistoricTask(String id) { 381 private HistoricTaskInstance getHistoricTask(String id) {
363 return historyService.createHistoricTaskInstanceQuery().taskId(id).singleResult(); 382 return historyService.createHistoricTaskInstanceQuery().taskId(id).singleResult();
364 } 383 }
365 384
366 @Override 385 @Override
367 public List<BpmTaskSimpleRespVO> getReturnTaskList(String taskId) { 386 public List<BpmTaskSimpleRespVO> getReturnTaskList(String taskId) {
368 - // 当前任务 task 387 + // 1. 校验当前任务 task 存在
369 Task task = getTask(taskId); 388 Task task = getTask(taskId);
  389 + if (task == null) {
  390 + throw exception(TASK_NOT_EXISTS);
  391 + }
370 // 根据流程定义获取流程模型信息 392 // 根据流程定义获取流程模型信息
371 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(task.getProcessDefinitionId()); 393 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(task.getProcessDefinitionId());
372 - // 查询该任务的前置任务节点的key集合  
373 - Set<String> historyTaksDefinitionKeySet = getPreTaskByCurrentTask(task, bpmnModel);  
374 - if (CollUtil.isEmpty(historyTaksDefinitionKeySet)) {  
375 - return Collections.emptyList();  
376 - }  
377 - // 获取当前任务节点元素  
378 - FlowElement source = ModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());  
379 - List<FlowElement> elementList = new ArrayList<>();  
380 - for (String activityId : historyTaksDefinitionKeySet) {  
381 - FlowElement target = ModelUtils.getFlowElementById(bpmnModel, activityId);  
382 - //非 串行和子流程则加入返回节点 elementList  
383 - boolean isSequential = ModelUtils.isSequentialReachable(source, target, new HashSet<>());  
384 - if (isSequential) {  
385 - elementList.add(target);  
386 - } 394 + FlowElement source = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());
  395 + if (source == null) {
  396 + throw exception(TASK_NOT_EXISTS);
387 } 397 }
388 - return BpmTaskConvert.INSTANCE.convertList(elementList);  
389 - }  
390 398
391 - /**  
392 - * 查询当前流程实例符合条件可回退的 taskDefinitionKey 集合  
393 - *  
394 - * @param task 当前任务  
395 - * @param bpmnModel 当前流程定义对应的流程模型  
396 - * @return 符合条件的已去重的 taskDefinitionKey集合  
397 - */  
398 - private Set<String> getPreTaskByCurrentTask(Task task, BpmnModel bpmnModel) {  
399 - // 获取当前任务节点元素  
400 - FlowElement source = ModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());  
401 - //拿到当前任务节点的前置节点集合  
402 - List<UserTask> preUserTaskList = ModelUtils.getPreUserTaskList(source, null, null);  
403 - //需要保证这些节点都是在该source节点之前的  
404 - if (CollUtil.isNotEmpty(preUserTaskList)) {  
405 - return convertSet(preUserTaskList, UserTask::getId); 399 + // 2.1 查询该任务的前置任务节点的 key 集合
  400 + List<UserTask> previousUserList = BpmnModelUtils.getPreviousUserTaskList(source, null, null);
  401 + if (CollUtil.isEmpty(previousUserList)) {
  402 + return Collections.emptyList();
406 } 403 }
407 - return Collections.emptySet(); 404 + // 2.2 过滤:只有串行可到达的节点,才可以回退。类似非串行、子流程无法退回
  405 + previousUserList.removeIf(userTask -> !BpmnModelUtils.isSequentialReachable(source, userTask, null));
  406 + return BpmTaskConvert.INSTANCE.convertList(previousUserList);
408 } 407 }
409 408
410 @Override 409 @Override
411 @Transactional(rollbackFor = Exception.class) 410 @Transactional(rollbackFor = Exception.class)
412 public void returnTask(BpmTaskReturnReqVO reqVO) { 411 public void returnTask(BpmTaskReturnReqVO reqVO) {
413 - // 当前任务 task  
414 - Task task = validateReturnTask(reqVO.getId());  
415 - // 校验源头和目标节点的关系,并返回目标元素  
416 - FlowElement targetElement = validateReturnProcessDefinition(task.getTaskDefinitionKey(), reqVO.getTargetDefinitionKey(), task.getProcessDefinitionId());  
417 - //调用flowable框架的回退逻辑  
418 - this.handlerReturn(task, targetElement, reqVO);  
419 - // 更新任务扩展表  
420 - taskExtMapper.updateByTaskId(  
421 - new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.BACK.getResult())  
422 - .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason()));  
423 - }  
424 -  
425 - /**  
426 - * 校验当前流程是否可以操作回退  
427 - *  
428 - * @param taskId 当前任务ID  
429 - * @return  
430 - */  
431 - private Task validateReturnTask(String taskId) {  
432 - // 当前任务 task  
433 - Task task = getTask(taskId);  
434 - if (task.isSuspended()) {  
435 - throw exception(TASK_IS_PENDING);  
436 - }  
437 - return task; 412 + // 1.1 当前任务 task
  413 + Task task = validateTask(reqVO.getId());
  414 + // 1.2 校验源头和目标节点的关系,并返回目标元素
  415 + FlowElement targetElement = validateTargetTaskCanReturn(task.getTaskDefinitionKey(), reqVO.getTargetDefinitionKey(), task.getProcessDefinitionId());
  416 +
  417 + // 2. 调用 flowable 框架的回退逻辑
  418 + returnTask0(task, targetElement, reqVO);
  419 +
  420 + // 3. 更新任务扩展表
  421 + taskExtMapper.updateByTaskId(new BpmTaskExtDO().setTaskId(task.getId())
  422 + .setResult(BpmProcessInstanceResultEnum.BACK.getResult())
  423 + .setEndTime(LocalDateTime.now()).setReason(reqVO.getReason()));
438 } 424 }
439 425
440 /** 426 /**
441 - * 回退流程节点时,校验源头节点和目标节点的关系 427 + * 回退流程节点时,校验目标任务节点是否可回退
442 * 428 *
443 - * @param sourceKey 当前任务节点Key  
444 - * @param targetKey 目标任务节点key  
445 - * @param processDefinitionId 当前流程定义ID  
446 - * @return 目标元素 429 + * @param sourceKey 当前任务节点 Key
  430 + * @param targetKey 目标任务节点 key
  431 + * @param processDefinitionId 当前流程定义 ID
  432 + * @return 目标任务节点元素
447 */ 433 */
448 - private FlowElement validateReturnProcessDefinition(String sourceKey, String targetKey, String processDefinitionId) {  
449 - // 获取流程模型信息 434 + private FlowElement validateTargetTaskCanReturn(String sourceKey, String targetKey, String processDefinitionId) {
  435 + // 1.1 获取流程模型信息
450 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(processDefinitionId); 436 BpmnModel bpmnModel = bpmModelService.getBpmnModelByDefinitionId(processDefinitionId);
451 - // 获取当前任务节点元素  
452 - FlowElement source = ModelUtils.getFlowElementById(bpmnModel, sourceKey);  
453 - // 获取跳转的节点元素  
454 - FlowElement target = ModelUtils.getFlowElementById(bpmnModel, targetKey);  
455 - if (null == target) { 437 + // 1.3 获取当前任务节点元素
  438 + FlowElement source = BpmnModelUtils.getFlowElementById(bpmnModel, sourceKey);
  439 + // 1.3 获取跳转的节点元素
  440 + FlowElement target = BpmnModelUtils.getFlowElementById(bpmnModel, targetKey);
  441 + if (target == null) {
456 throw exception(TASK_TARGET_NODE_NOT_EXISTS); 442 throw exception(TASK_TARGET_NODE_NOT_EXISTS);
457 } 443 }
458 - // 从当前节点向前扫描,判断当前节点与目标节点是否属于串行,若目标节点是在并行网关上或非同一路线上,不可跳转  
459 - boolean isSequential = ModelUtils.isSequentialReachable(source, target, new HashSet<>());  
460 - if (!isSequential) {  
461 - throw exception(TASK_SOURCE_TARGET_ERROR); 444 +
  445 + // 2.2 只有串行可到达的节点,才可以回退。类似非串行、子流程无法退回
  446 + if (!BpmnModelUtils.isSequentialReachable(source, target, null)) {
  447 + throw exception(TASK_RETURN_FAIL_SOURCE_TARGET_ERROR);
462 } 448 }
463 return target; 449 return target;
464 } 450 }
465 451
466 /** 452 /**
467 - * 处理回退逻辑 453 + * 执行回退逻辑
468 * 454 *
469 - * @param task 当前回退的任务 455 + * @param currentTask 当前回退的任务
470 * @param targetElement 需要回退到的目标任务 456 * @param targetElement 需要回退到的目标任务
471 * @param reqVO 前端参数封装 457 * @param reqVO 前端参数封装
472 */ 458 */
473 - public void handlerReturn(Task task, FlowElement targetElement, BpmTaskReturnReqVO reqVO) {  
474 - // 获取所有正常进行的任务节点 Key,这些任务不能直接使用,需要找出其中需要撤回的任务  
475 - List<Task> runTaskList = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).list();  
476 - List<String> runTaskKeyList = convertList(runTaskList, Task::getTaskDefinitionKey);  
477 - // 通过 targetElement 的出口连线,结合 runTaskList 比对,获取需要撤回的任务 key  
478 - List<UserTask> returnUserTaskList = ModelUtils.iteratorFindChildUserTasks(targetElement, runTaskKeyList, null, null);  
479 - // 需退回任务 key  
480 - List<String> returnTaskDefinitionKeyList = convertList(returnUserTaskList, UserTask::getId);  
481 -  
482 - // 通过 key 和 runTaskList 中的key对比,拿到任务ID,设置设置回退意见  
483 - List<String> currentTaskIds = new ArrayList<>();  
484 - returnTaskDefinitionKeyList.forEach(currentId -> runTaskList.forEach(runTask -> {  
485 - if (currentId.equals(runTask.getTaskDefinitionKey())) {  
486 - currentTaskIds.add(runTask.getId()); 459 + public void returnTask0(Task currentTask, FlowElement targetElement, BpmTaskReturnReqVO reqVO) {
  460 + // 1. 获得所有需要回撤的任务 taskDefinitionKey,用于稍后的 moveActivityIdsToSingleActivityId 回撤
  461 + // 1.1 获取所有正常进行的任务节点 Key
  462 + List<Task> taskList = taskService.createTaskQuery().processInstanceId(currentTask.getProcessInstanceId()).list();
  463 + List<String> runTaskKeyList = convertList(taskList, Task::getTaskDefinitionKey);
  464 + // 1.2 通过 targetElement 的出口连线,计算在 runTaskKeyList 有哪些 key 需要被撤回
  465 + // 为什么不直接使用 runTaskKeyList 呢?因为可能存在多个审批分支,例如说:A -> B -> C 和 D -> F,而只要 C 撤回到 A,需要排除掉 F
  466 + List<UserTask> returnUserTaskList = BpmnModelUtils.iteratorFindChildUserTasks(targetElement, runTaskKeyList, null, null);
  467 + List<String> returnTaskKeyList = convertList(returnUserTaskList, UserTask::getId);
  468 +
  469 + // 2. 给当前要被回退的 task 数组,设置回退意见
  470 + taskList.forEach(task -> {
  471 + // 需要排除掉,不需要设置回退意见的任务
  472 + if (!returnTaskKeyList.contains(task.getTaskDefinitionKey())) {
  473 + return;
487 } 474 }
488 - }));  
489 - if (CollUtil.isEmpty(currentTaskIds)) {  
490 - throw exception(TASK_RETURN_FAIL);  
491 - }  
492 - // 设置回退意见  
493 - for (String currentTaskId : currentTaskIds) {  
494 - taskService.addComment(currentTaskId, task.getProcessInstanceId(), BpmProcessInstanceResultEnum.BACK.getResult().toString(), reqVO.getReason());  
495 - }  
496 - // 1 对 1 或 多 对 1 情况,currentIds 当前要跳转的节点列表(1或多),targetKey 跳转到的节点(1) 475 + taskService.addComment(task.getId(), currentTask.getProcessInstanceId(),
  476 + BpmProcessInstanceResultEnum.BACK.getResult().toString(), reqVO.getReason());
  477 + });
  478 +
  479 + // 3. 执行驳回
497 runtimeService.createChangeActivityStateBuilder() 480 runtimeService.createChangeActivityStateBuilder()
498 - .processInstanceId(task.getProcessInstanceId())  
499 - .moveActivityIdsToSingleActivityId(returnTaskDefinitionKeyList, reqVO.getTargetDefinitionKey()) 481 + .processInstanceId(currentTask.getProcessInstanceId())
  482 + .moveActivityIdsToSingleActivityId(returnTaskKeyList, // 当前要跳转的节点列表( 1 或多)
  483 + reqVO.getTargetDefinitionKey()) // targetKey 跳转到的节点(1)
500 .changeState(); 484 .changeState();
501 } 485 }
502 486
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java
@@ -217,10 +217,10 @@ public class MemberUserServiceImpl implements MemberUserService { @@ -217,10 +217,10 @@ public class MemberUserServiceImpl implements MemberUserService {
217 } 217 }
218 // 如果 id 为空,说明不用比较是否为相同 id 的用户 218 // 如果 id 为空,说明不用比较是否为相同 id 的用户
219 if (id == null) { 219 if (id == null) {
220 - throw exception(USER_MOBILE_USED); 220 + throw exception(USER_MOBILE_USED, mobile);
221 } 221 }
222 if (!user.getId().equals(id)) { 222 if (!user.getId().equals(id)) {
223 - throw exception(USER_MOBILE_USED); 223 + throw exception(USER_MOBILE_USED, mobile);
224 } 224 }
225 } 225 }
226 226
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java
@@ -46,7 +46,7 @@ public class SensitiveWordServiceImpl implements SensitiveWordService { @@ -46,7 +46,7 @@ public class SensitiveWordServiceImpl implements SensitiveWordService {
46 /** 46 /**
47 * 是否开启敏感词功能 47 * 是否开启敏感词功能
48 */ 48 */
49 - private static final Boolean ENABLED = false; 49 + public static Boolean ENABLED = false;
50 50
51 /** 51 /**
52 * 敏感词列表缓存 52 * 敏感词列表缓存
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java
@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.Sensitiv @@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.Sensitiv
10 import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordUpdateReqVO; 10 import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordUpdateReqVO;
11 import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; 11 import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO;
12 import cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper; 12 import cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper;
  13 +import org.junit.jupiter.api.BeforeEach;
13 import org.junit.jupiter.api.Test; 14 import org.junit.jupiter.api.Test;
14 import org.springframework.context.annotation.Import; 15 import org.springframework.context.annotation.Import;
15 16
@@ -42,6 +43,11 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest { @@ -42,6 +43,11 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest {
42 @Resource 43 @Resource
43 private SensitiveWordMapper sensitiveWordMapper; 44 private SensitiveWordMapper sensitiveWordMapper;
44 45
  46 + @BeforeEach
  47 + public void setUp() {
  48 + SensitiveWordServiceImpl.ENABLED = true;
  49 + }
  50 +
45 @Test 51 @Test
46 public void testInitLocalCache() { 52 public void testInitLocalCache() {
47 SensitiveWordDO wordDO1 = randomPojo(SensitiveWordDO.class, o -> o.setName("傻瓜") 53 SensitiveWordDO wordDO1 = randomPojo(SensitiveWordDO.class, o -> o.setName("傻瓜")
yudao-ui-admin/src/views/bpm/processInstance/index.vue
@@ -132,6 +132,9 @@ export default { @@ -132,6 +132,9 @@ export default {
132 created() { 132 created() {
133 this.getList(); 133 this.getList();
134 }, 134 },
  135 + activated() {
  136 + this.getList();
  137 + },
135 methods: { 138 methods: {
136 /** 查询列表 */ 139 /** 查询列表 */
137 getList() { 140 getList() {