1. 统一包名修改
This commit is contained in:
@@ -3,10 +3,10 @@
|
|||||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /cloud-module-bpm-server
|
RUN mkdir -p /zt-module-bpm-server
|
||||||
WORKDIR /cloud-module-bpm-server
|
WORKDIR /zt-module-bpm-server
|
||||||
## 将后端项目的 Jar 文件,复制到镜像中
|
## 将后端项目的 Jar 文件,复制到镜像中
|
||||||
COPY ./target/cloud-module-bpm-server.jar app.jar
|
COPY ./target/zt-module-bpm-server.jar app.jar
|
||||||
|
|
||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class BpmFormPageReqVO extends PageParam {
|
public class BpmFormPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "表单名称", example = "ZT")
|
@Schema(description = "表单名称", example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class BpmFormRespVO {
|
|||||||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
@NotNull(message = "表单名称不能为空")
|
@NotNull(message = "表单名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class BpmFormSaveReqVO {
|
|||||||
@Schema(description = "表单编号", example = "1024")
|
@Schema(description = "表单编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
@NotNull(message = "表单名称不能为空")
|
@NotNull(message = "表单名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BpmUserGroupPageReqVO extends PageParam {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", example = "ZT")
|
@Schema(description = "组名", example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "状态", example = "1")
|
@Schema(description = "状态", example = "1")
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ public class BpmUserGroupRespVO {
|
|||||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ public class BpmUserGroupSaveReqVO {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
@NotNull(message = "组名不能为空")
|
@NotNull(message = "组名不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "描述", example = "ZT源码")
|
@Schema(description = "描述", example = "芋道源码")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class BpmModelMetaInfoVO {
|
public class BpmModelMetaInfoVO {
|
||||||
|
|
||||||
@Schema(description = "流程图标", example = "https://www.iocoder.cn/cloud.jpg")
|
@Schema(description = "流程图标", example = "https://www.iocoder.cn/zt.jpg")
|
||||||
@URL(message = "流程图标格式不正确")
|
@URL(message = "流程图标格式不正确")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ public class BpmModelRespVO extends BpmModelMetaInfoVO {
|
|||||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_cloud")
|
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_zt")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程图标", example = "https://www.iocoder.cn/cloud.jpg")
|
@Schema(description = "流程图标", example = "https://www.iocoder.cn/zt.jpg")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
@Schema(description = "流程分类编号", example = "1")
|
@Schema(description = "流程分类编号", example = "1")
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ public class BpmModelSaveReqVO extends BpmModelMetaInfoVO {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_cloud")
|
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_zt")
|
||||||
@NotEmpty(message = "流程标识不能为空")
|
@NotEmpty(message = "流程标识不能为空")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
@NotEmpty(message = "流程名称不能为空")
|
@NotEmpty(message = "流程名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BpmSimpleModelNodeVO {
|
|||||||
@Schema(description = "模型节点名称", example = "领导审批")
|
@Schema(description = "模型节点名称", example = "领导审批")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "节点展示内容", example = "指定成员: ZT源码")
|
@Schema(description = "节点展示内容", example = "指定成员: 芋道源码")
|
||||||
private String showText;
|
private String showText;
|
||||||
|
|
||||||
@Schema(description = "子节点")
|
@Schema(description = "子节点")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class BpmProcessDefinitionRespVO extends BpmModelMetaInfoVO {
|
|||||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "youdao")
|
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "youdao")
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class BpmOALeaveCreateReqVO {
|
|||||||
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class BpmOALeavePageReqVO extends PageParam {
|
|||||||
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
|
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因,模糊匹配", example = "阅读ZT源码")
|
@Schema(description = "原因,模糊匹配", example = "阅读芋道源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BpmOALeaveRespVO {
|
|||||||
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class BpmProcessInstanceCopyPageReqVO extends PageParam {
|
public class BpmProcessInstanceCopyPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程名称", example = "ZT")
|
@Schema(description = "流程名称", example = "芋道")
|
||||||
private String processInstanceName;
|
private String processInstanceName;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class BpmProcessInstancePageReqVO extends PageParam {
|
public class BpmProcessInstancePageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程名称", example = "ZT")
|
@Schema(description = "流程名称", example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程定义的标识", example = "2048")
|
@Schema(description = "流程定义的标识", example = "2048")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class BpmProcessInstanceRespVO {
|
|||||||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程摘要")
|
@Schema(description = "流程摘要")
|
||||||
@@ -71,7 +71,7 @@ public class BpmProcessInstanceRespVO {
|
|||||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class BpmTaskPageReqVO extends PageParam {
|
public class BpmTaskPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程任务名", example = "ZT")
|
@Schema(description = "流程任务名", example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程分类", example = "1")
|
@Schema(description = "流程分类", example = "1")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class BpmTaskRespVO {
|
|||||||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@@ -97,7 +97,7 @@ public class BpmTaskRespVO {
|
|||||||
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* 提供 RESTful API 给前端:
|
* 提供 RESTful API 给前端:
|
||||||
* 1. admin 包:提供给管理后台 cloud-ui-admin 前端项目
|
* 1. admin 包:提供给管理后台 zt-ui-admin 前端项目
|
||||||
* 2. app 包:提供给用户 APP cloud-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
* 2. app 包:提供给用户 APP zt-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||||
*/
|
*/
|
||||||
package com.zt.plat.module.bpm.controller;
|
package com.zt.plat.module.bpm.controller;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<http://www.iocoder.cn/Spring-Boot/MapStruct/?cloud>
|
<http://www.iocoder.cn/Spring-Boot/MapStruct/?zt>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executeOriginalBehavior(DelegateExecution execution, ExecutionEntity multiInstanceRootExecution, int loopCounter) {
|
protected void executeOriginalBehavior(DelegateExecution execution, ExecutionEntity multiInstanceRootExecution, int loopCounter) {
|
||||||
// 参见 https://gitee.com/zhijiantianya/cloud-cloud/issues/IC239F
|
// 参见 https://gitee.com/zhijiantianya/zt-cloud/issues/IC239F
|
||||||
super.collectionExpression = null;
|
super.collectionExpression = null;
|
||||||
super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId());
|
super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId());
|
||||||
super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId());
|
super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId());
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.zt.plat.module.bpm.framework.web.config;
|
package com.zt.plat.module.bpm.framework.web.config;
|
||||||
|
|
||||||
import com.zt.plat.framework.common.enums.WebFilterOrderEnum;
|
import com.zt.plat.framework.common.enums.WebFilterOrderEnum;
|
||||||
import com.zt.plat.framework.swagger.config.CloudSwaggerAutoConfiguration;
|
import com.zt.plat.framework.swagger.config.ZtSwaggerAutoConfiguration;
|
||||||
import com.zt.plat.module.bpm.framework.web.core.FlowableWebFilter;
|
import com.zt.plat.module.bpm.framework.web.core.FlowableWebFilter;
|
||||||
import org.springdoc.core.models.GroupedOpenApi;
|
import org.springdoc.core.models.GroupedOpenApi;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
|
|||||||
@@ -785,7 +785,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason()));
|
BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason()));
|
||||||
// 2.3 如果当前任务时被加签的,则加它的根任务也标记成未通过
|
// 2.3 如果当前任务时被加签的,则加它的根任务也标记成未通过
|
||||||
// 疑问:为什么要标记未通过呢?
|
// 疑问:为什么要标记未通过呢?
|
||||||
// 回答:例如说 A 任务被向前加签除 B 任务时,B 任务被审批不通过,此时 A 会被取消。而 cloud-ui-admin-vue3 不展示“已取消”的任务,导致展示不出审批不通过的细节。
|
// 回答:例如说 A 任务被向前加签除 B 任务时,B 任务被审批不通过,此时 A 会被取消。而 zt-ui-admin-vue3 不展示“已取消”的任务,导致展示不出审批不通过的细节。
|
||||||
if (task.getParentTaskId() != null) {
|
if (task.getParentTaskId() != null) {
|
||||||
String rootParentId = getTaskRootParentId(task);
|
String rootParentId = getTaskRootParentId(task);
|
||||||
updateTaskStatusAndReason(rootParentId, BpmTaskStatusEnum.REJECT.getStatus(),
|
updateTaskStatusAndReason(rootParentId, BpmTaskStatusEnum.REJECT.getStatus(),
|
||||||
@@ -1233,7 +1233,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
/**
|
/**
|
||||||
* 特殊情况:部分情况下,TransactionSynchronizationManager 注册 afterCommit 监听时,不会被调用,但是 afterCompletion 可以
|
* 特殊情况:部分情况下,TransactionSynchronizationManager 注册 afterCommit 监听时,不会被调用,但是 afterCompletion 可以
|
||||||
* 例如说:第一个 task 就是配置【自动通过】或者【自动拒绝】时
|
* 例如说:第一个 task 就是配置【自动通过】或者【自动拒绝】时
|
||||||
* 参见 <a href="https://gitee.com/zhijiantianya/cloud-cloud/issues/IB7V7Q">issue</a> 反馈
|
* 参见 <a href="https://gitee.com/zhijiantianya/zt-cloud/issues/IB7V7Q">issue</a> 反馈
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void afterCompletion(int transactionStatus) {
|
public void afterCompletion(int transactionStatus) {
|
||||||
@@ -1308,7 +1308,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
/**
|
/**
|
||||||
* 特殊情况:部分情况下,TransactionSynchronizationManager 注册 afterCommit 监听时,不会被调用,但是 afterCompletion 可以
|
* 特殊情况:部分情况下,TransactionSynchronizationManager 注册 afterCommit 监听时,不会被调用,但是 afterCompletion 可以
|
||||||
* 例如说:第一个 task 就是配置【自动通过】或者【自动拒绝】时
|
* 例如说:第一个 task 就是配置【自动通过】或者【自动拒绝】时
|
||||||
* 参见 <a href="https://gitee.com/zhijiantianya/cloud-cloud/issues/IB7V7Q">issue</a> 反馈
|
* 参见 <a href="https://gitee.com/zhijiantianya/zt-cloud/issues/IB7V7Q">issue</a> 反馈
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void afterCompletion(int transactionStatus) {
|
public void afterCompletion(int transactionStatus) {
|
||||||
|
|||||||
@@ -89,6 +89,6 @@ spring:
|
|||||||
instance:
|
instance:
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||||
|
|
||||||
--- #################### ZT相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ logging:
|
|||||||
com.zt.plat.module.bpm.dal.mysql: debug
|
com.zt.plat.module.bpm.dal.mysql: debug
|
||||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||||
|
|
||||||
--- #################### ZT相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
# ZT配置项,设置当前项目所有自定义的配置
|
# 芋道配置项,设置当前项目所有自定义的配置
|
||||||
cloud:
|
zt:
|
||||||
env: # 多环境的配置项
|
env: # 多环境的配置项
|
||||||
tag: ${HOSTNAME}
|
tag: ${HOSTNAME}
|
||||||
security:
|
security:
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ mybatis-plus:
|
|||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
banner: false # 关闭控制台的 Banner 打印
|
||||||
type-aliases-package: ${cloud.info.base-package}.dal.dataobject
|
type-aliases-package: ${zt.info.base-package}.dal.dataobject
|
||||||
encryptor:
|
encryptor:
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||||
|
|
||||||
@@ -127,15 +127,15 @@ xxl:
|
|||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||||
accessToken: default_token # 执行器通讯TOKEN
|
accessToken: default_token # 执行器通讯TOKEN
|
||||||
|
|
||||||
--- #################### ZT相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
cloud:
|
zt:
|
||||||
info:
|
info:
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
base-package: com.zt.plat.module.bpm
|
base-package: com.zt.plat.module.bpm
|
||||||
web:
|
web:
|
||||||
admin-ui:
|
admin-ui:
|
||||||
url: http://dashboard.cloud.iocoder.cn # Admin 管理后台 UI 的地址
|
url: http://dashboard.zt.iocoder.cn # Admin 管理后台 UI 的地址
|
||||||
xss:
|
xss:
|
||||||
enable: false
|
enable: false
|
||||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||||
@@ -143,7 +143,7 @@ cloud:
|
|||||||
swagger:
|
swagger:
|
||||||
title: 管理后台
|
title: 管理后台
|
||||||
description: 提供管理员管理的所有功能
|
description: 提供管理员管理的所有功能
|
||||||
version: ${cloud.info.version}
|
version: ${zt.info.version}
|
||||||
tenant: # 多租户相关配置项
|
tenant: # 多租户相关配置项
|
||||||
enable: true
|
enable: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
||||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||||
<!-- 变量 cloud.info.base-package,基础业务包 -->
|
<!-- 变量 zt.info.base-package,基础业务包 -->
|
||||||
<springProperty scope="context" name="cloud.info.base-package" source="cloud.info.base-package"/>
|
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class BpmFormServiceTest extends BaseDbUnitTest {
|
|||||||
// 准备参数
|
// 准备参数
|
||||||
BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> {
|
BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> {
|
||||||
o.setId(dbForm.getId()); // 设置更新的 ID
|
o.setId(dbForm.getId()); // 设置更新的 ID
|
||||||
o.setConf("{'cloud': 'yuanma'}");
|
o.setConf("{'zt': 'yuanma'}");
|
||||||
o.setFields(randomFields());
|
o.setFields(randomFields());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ public class BpmFormServiceTest extends BaseDbUnitTest {
|
|||||||
public void testUpdateForm_notExists() {
|
public void testUpdateForm_notExists() {
|
||||||
// 准备参数
|
// 准备参数
|
||||||
BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> {
|
BpmFormSaveReqVO reqVO = randomPojo(BpmFormSaveReqVO.class, o -> {
|
||||||
o.setConf("{'cloud': 'yuanma'}");
|
o.setConf("{'zt': 'yuanma'}");
|
||||||
o.setFields(randomFields());
|
o.setFields(randomFields());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -117,14 +117,14 @@ public class BpmFormServiceTest extends BaseDbUnitTest {
|
|||||||
public void testGetFormPage() {
|
public void testGetFormPage() {
|
||||||
// mock 数据
|
// mock 数据
|
||||||
BpmFormDO dbForm = randomPojo(BpmFormDO.class, o -> { // 等会查询到
|
BpmFormDO dbForm = randomPojo(BpmFormDO.class, o -> { // 等会查询到
|
||||||
o.setName("ZT源码");
|
o.setName("芋道源码");
|
||||||
});
|
});
|
||||||
formMapper.insert(dbForm);
|
formMapper.insert(dbForm);
|
||||||
// 测试 name 不匹配
|
// 测试 name 不匹配
|
||||||
formMapper.insert(cloneIgnoreId(dbForm, o -> o.setName("源码")));
|
formMapper.insert(cloneIgnoreId(dbForm, o -> o.setName("源码")));
|
||||||
// 准备参数
|
// 准备参数
|
||||||
BpmFormPageReqVO reqVO = new BpmFormPageReqVO();
|
BpmFormPageReqVO reqVO = new BpmFormPageReqVO();
|
||||||
reqVO.setName("ZT");
|
reqVO.setName("芋道");
|
||||||
|
|
||||||
// 调用
|
// 调用
|
||||||
PageResult<BpmFormDO> pageResult = formService.getFormPage(reqVO);
|
PageResult<BpmFormDO> pageResult = formService.getFormPage(reqVO);
|
||||||
|
|||||||
@@ -102,13 +102,13 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest {
|
|||||||
public void testGetUserGroupPage() {
|
public void testGetUserGroupPage() {
|
||||||
// mock 数据
|
// mock 数据
|
||||||
BpmUserGroupDO dbUserGroup = RandomUtils.randomPojo(BpmUserGroupDO.class, o -> { // 等会查询到
|
BpmUserGroupDO dbUserGroup = RandomUtils.randomPojo(BpmUserGroupDO.class, o -> { // 等会查询到
|
||||||
o.setName("ZT源码");
|
o.setName("芋道源码");
|
||||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||||
o.setCreateTime(buildTime(2021, 11, 11));
|
o.setCreateTime(buildTime(2021, 11, 11));
|
||||||
});
|
});
|
||||||
userGroupMapper.insert(dbUserGroup);
|
userGroupMapper.insert(dbUserGroup);
|
||||||
// 测试 name 不匹配
|
// 测试 name 不匹配
|
||||||
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setName("ZT")));
|
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setName("芋道")));
|
||||||
// 测试 status 不匹配
|
// 测试 status 不匹配
|
||||||
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
|
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
|
||||||
// 测试 createTime 不匹配
|
// 测试 createTime 不匹配
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ spring:
|
|||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试
|
lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试
|
||||||
type-aliases-package: ${cloud.info.base-package}.dal.dataobject
|
type-aliases-package: ${zt.info.base-package}.dal.dataobject
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
id-type: AUTO # H2 主键递增
|
id-type: AUTO # H2 主键递增
|
||||||
@@ -37,9 +37,9 @@ mybatis-plus:
|
|||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
--- #################### ZT相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
# ZT配置项,设置当前项目所有自定义的配置
|
# 芋道配置项,设置当前项目所有自定义的配置
|
||||||
cloud:
|
zt:
|
||||||
info:
|
info:
|
||||||
base-package: com.zt.plat.module.bpm
|
base-package: com.zt.plat.module.bpm
|
||||||
|
|||||||
Reference in New Issue
Block a user