Commit f82b8dab by guominglei

修改未获取多个

parent 8aea83f2
......@@ -189,7 +189,7 @@ public interface RunRecordingMapper {
@Param("endTime")Date endTime,
@Param("flowIdList")List<Integer> flowIdList);
RunRecording findMaxByFlowId(@Param("flowId")Integer flowId);
List<RunRecording> findMaxByFlowId(@Param("flowId")Integer flowId);
/**
* 查询过去一个小时的和未完成的工作流实例
......
......@@ -66,7 +66,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
List<FlowStatusSnapshoot> flowStatusSnapshootList = new ArrayList<>();
flowList.forEach(flow -> {
RunRecording maxRunRecording = runRecordingMapper.findMaxByFlowId(flow.getFlowId());
List<RunRecording> maxRunRecordingList = runRecordingMapper.findMaxByFlowId(flow.getFlowId());
FlowStatusSnapshoot flowStatusSnapshoot = new FlowStatusSnapshoot();
flowStatusSnapshoot.setDay(date);
flowStatusSnapshoot.setFlowId(flow.getFlowId());
......@@ -77,9 +77,10 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
//统计运行实例的数据
//如果存在实例
if (maxRunRecording != null){
if (null != maxRunRecordingList && maxRunRecordingList.size() > 0){
//获取今天凌晨的时间戳
Long time = LocalDate.now().atStartOfDay(ZoneOffset.ofHours(8)).toInstant().toEpochMilli();
RunRecording maxRunRecording = maxRunRecordingList.get(0);
//从凌晨到现在是否有运行实例
if (time.longValue() > maxRunRecording.getTriggerTime().longValue()){
flowStatusSnapshoot.setFlowStatus(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment