From a952421d785d5d525f145af665bd15820b38da82 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Fri, 18 Apr 2025 10:07:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E5=A4=B4=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/wflow/mapper/WflowModelHistorysMapper.java | 9 +++++++++ .../wflow/mapper/xml/WflowModelHistorysMapper.xml | 13 +++++++++++++ .../config/WflowEngineConfigurationConfigurer.java | 7 ++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/wflow/mapper/xml/WflowModelHistorysMapper.xml diff --git a/src/main/java/com/wflow/mapper/WflowModelHistorysMapper.java b/src/main/java/com/wflow/mapper/WflowModelHistorysMapper.java index 78397f6..d931d4f 100644 --- a/src/main/java/com/wflow/mapper/WflowModelHistorysMapper.java +++ b/src/main/java/com/wflow/mapper/WflowModelHistorysMapper.java @@ -4,10 +4,19 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.wflow.bean.entity.WflowModelHistorys; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * @author : willian fu * @date : 2022/8/24 */ @Mapper public interface WflowModelHistorysMapper extends BaseMapper { + /** + * 查询最新的历史 + * + * @param idList + * @return + */ + List getNewsVersionList(List idList); } diff --git a/src/main/java/com/wflow/mapper/xml/WflowModelHistorysMapper.xml b/src/main/java/com/wflow/mapper/xml/WflowModelHistorysMapper.xml new file mode 100644 index 0000000..1d21062 --- /dev/null +++ b/src/main/java/com/wflow/mapper/xml/WflowModelHistorysMapper.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/src/main/java/com/wflow/workflow/config/WflowEngineConfigurationConfigurer.java b/src/main/java/com/wflow/workflow/config/WflowEngineConfigurationConfigurer.java index b94b640..fa21649 100644 --- a/src/main/java/com/wflow/workflow/config/WflowEngineConfigurationConfigurer.java +++ b/src/main/java/com/wflow/workflow/config/WflowEngineConfigurationConfigurer.java @@ -8,7 +8,12 @@ import org.springframework.stereotype.Component; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; +import java.util.HashSet; import java.util.Random; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.ThreadPoolExecutor; /** * 添加流程引擎默认配置 @@ -25,6 +30,6 @@ public class WflowEngineConfigurationConfigurer implements EngineConfigurationCo engineConfiguration.setActivityBehaviorFactory(new WflowActivityBehaviorFactory()); engineConfiguration.setBpmnDeployer(new CustomIdBpmnDeployer()); //重写flowable的id生成器,生成流程实例ID规则为:wf+ 日期时间数字 + 4位随机数 - engineConfiguration.setIdGenerator(() -> "wf" + LocalDateTime.now().format(formatter) + String.format("%04d", new Random().nextInt(10000))); +// engineConfiguration.setIdGenerator(() -> "wf" + LocalDateTime.now().format(formatter) + String.format("%04d", new Random().nextInt(10000))); } }