优化航班历史转换代码

This commit is contained in:
zhouxiunai
2019-01-21 19:00:27 +08:00
parent 0f4d5613df
commit 2338c23217
4 changed files with 55 additions and 7 deletions
@@ -84,7 +84,7 @@ public class FlightHisScheduled {
.must(QueryBuilders.termQuery("SODT",SODT))
.must(QueryBuilders.termQuery("FLID",FLID));
List<Map<String, Object>> listInEs = ElasticsearchUtil.searchListData(INDEX_NAME, ES_TYPE, boolQuery, null, "FLID", null, null, null);
if(null!=listInEs && listInEs.size()>0){
if(!CollectionUtils.isEmpty(listInEs)){
//获取es中的id 并更新当前历史数据
//唯一 获取第一个
Map<String, Object> map = listInEs.get(0);
@@ -99,7 +99,7 @@ public class FlightHisScheduled {
}
//删除redis中已成为历史数据的动态消息
if(null!=fltrIdForHistory && fltrIdForHistory.size()>0){
if(!CollectionUtils.isEmpty(fltrIdForHistory)){
flightInfoService.batchDeleteFltr(fltrIdForHistory);
logger.info("本次删除转历史动态航班数据:{}条",fltrIdForHistory.size());
}