1.增加FltrEsDto在存入es的时候,对ABN字段的body格式化成字符串存储。2.修复转航班历史失败依然删除了redis上的航班记录导致航班丢失的问题。

This commit is contained in:
zhouxiunai
2019-04-11 20:26:28 +08:00
parent d4944ec530
commit 53094feeba
7 changed files with 1971 additions and 9 deletions
@@ -63,13 +63,17 @@ public class FlightHisScheduled {
logger.info("获取到历史动态航班数据:{}条,准备转历史",fltrsHistory.size());
//航班历史写入ELK
flightHisServiceImpl.save(fltrsHistory);
List<FLTR> successSaveFltr = flightHisServiceImpl.save(fltrsHistory);
//从redis中删除历史航班
List<String> fltrIdForHistory = fltrsHistory.stream().map(node->{
//从redis中删除成功保存的历史航班
List<String> fltrIdForHistory = successSaveFltr.stream().map(node->{
return node.getFLID().toString();
}).collect(Collectors.toList());
flightInfoService.batchDeleteFltr(fltrIdForHistory);
if(!CollectionUtils.isEmpty(fltrIdForHistory))
{
flightInfoService.batchDeleteFltr(fltrIdForHistory);
}
} catch (Exception e) {
logger.error("动态航班转历史错误:{}",e.getMessage());
}