Commit 581c3c18 by guo_minglei@163.com

添加判断

parent 712b42c4
......@@ -129,7 +129,13 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
String preHourDate = preHourLocalDateTime.format(DATE_FORMATTER);
String preHourHour = String.valueOf(preHourLocalDateTime.getHour());
List<FlowStatusSnapshoot> preHourFlowStatusSnapshootList = flowStatusSnapshootMapper.findByDateAndHourAndFlowId(preHourDate, preHourHour, flow.getFlowId());
flowStatusSnapshootList.addAll(preHourFlowStatusSnapshootList);
if (null != preHourFlowStatusSnapshootList || preHourFlowStatusSnapshootList.size() > 0){
flowStatusSnapshootList.addAll(preHourFlowStatusSnapshootList);
}else {
//如果上个小时也没有,就设置为未运行
flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount());
flowStatusSnapshootList.add(flowStatusSnapshoot);
}
}
}
}else {
......@@ -138,7 +144,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
flowStatusSnapshootList.add(flowStatusSnapshoot);
}
});
if (flowList != null && flowList.size() > 0){
if (null != flowStatusSnapshootList && flowStatusSnapshootList.size() > 0){
flowStatusSnapshootMapper.saveList(flowStatusSnapshootList);
}
//获取过期的时间戳
......
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