包头工作流提交
This commit is contained in:
parent
786c00c997
commit
a952421d78
@ -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<WflowModelHistorys> {
|
||||
/**
|
||||
* 查询最新的历史
|
||||
*
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
List<WflowModelHistorys> getNewsVersionList(List<String> idList);
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wflow.mapper.WflowModelHistorysMapper">
|
||||
<select id="getNewsVersionList" resultType="com.wflow.bean.entity.WflowModelHistorys">
|
||||
SELECT h1.*
|
||||
FROM wflow_model_historys h1
|
||||
join (select max(version) as version from wflow_model_historys group by version)t on t.version=h1.version
|
||||
WHERE id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user