Skip to content

Commit

Permalink
issue 解决自增 ID 主键冲突问题
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Sep 8, 2024
1 parent 6be5ada commit 09ff25d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ public void saveTaskCc(NodeModel nodeModel, FlwTask flwTask, FlowCreator flowCre
if (ObjectUtils.isNotEmpty(nodeUserList)) {
// 抄送任务
FlwHisTask flwHisTask = FlwHisTask.of(flwTask, TaskState.complete);
flwHisTask.setId(null);
flwHisTask.setTaskType(TaskType.cc);
flwHisTask.setPerformType(PerformType.copy);
flwHisTask.calculateDuration();
Expand Down Expand Up @@ -1015,8 +1016,9 @@ protected List<FlwTask> saveTask(FlwTask flwTask, PerformType performType, List<
}

if (performType == PerformType.start) {
// 发起任务
// 发起任务,创建历史任务
FlwHisTask flwHisTask = FlwHisTask.of(flwTask, TaskState.complete);
flwHisTask.setId(null);
flwHisTask.calculateDuration();
if (hisTaskDao.insert(flwHisTask)) {
// 设置为执行任务
Expand Down

0 comments on commit 09ff25d

Please sign in to comment.