Merge branch 'master' of git@git.int.it2000.com.cn:airport-chengdu/msgexchange-api.git

This commit is contained in:
zhouxiunai
2018-12-20 15:41:48 +08:00
3 changed files with 5 additions and 8 deletions
@@ -1,6 +1,5 @@
package com.gzzn.omms.msgexchangeapi.scheduled; package com.gzzn.omms.msgexchangeapi.scheduled;
import java.math.BigInteger;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@@ -78,7 +77,7 @@ public class FlightHisScheduled {
logger.info("开始采集历史数据..."); logger.info("开始采集历史数据...");
//1.从redis中获取 当前的动态消息 //1.从redis中获取 当前的动态消息
List<FLTR> fltrs = flightInfoService.findAll(); List<FLTR> fltrs = flightInfoService.findAll();
List<BigInteger> fltrIdForHistory = new ArrayList<BigInteger>(); List<String> fltrIdForHistory = new ArrayList<String>();
List<FLTR> fltrsHistory = new ArrayList<FLTR>(); List<FLTR> fltrsHistory = new ArrayList<FLTR>();
//遍历 查找出已经 可以作为历史数据的动态消息 //遍历 查找出已经 可以作为历史数据的动态消息
@@ -161,11 +160,11 @@ public class FlightHisScheduled {
Map<String, Object> map = listInEs.get(0); Map<String, Object> map = listInEs.get(0);
String id = (String) map.get("id"); String id = (String) map.get("id");
ElasticsearchUtil.updateDataById(jsondata, INDEX_NAME, ES_TYPE, id); ElasticsearchUtil.updateDataById(jsondata, INDEX_NAME, ES_TYPE, id);
fltrIdForHistory.add(fltr.getFLID()); fltrIdForHistory.add(fltr.getFLID().toString());
}else{ }else{
//新增历史数据 //新增历史数据
ElasticsearchUtil.addData(jsondata, INDEX_NAME, ES_TYPE); ElasticsearchUtil.addData(jsondata, INDEX_NAME, ES_TYPE);
fltrIdForHistory.add(fltr.getFLID()); fltrIdForHistory.add(fltr.getFLID().toString());
} }
} }
} }
@@ -1,6 +1,5 @@
package com.gzzn.omms.msgexchangeapi.service.flightInfo; package com.gzzn.omms.msgexchangeapi.service.flightInfo;
import java.math.BigInteger;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@@ -88,7 +87,7 @@ public class FlightInfoServiceImpl implements IFlightInfoService {
} }
@Override @Override
public boolean batchDeleteFltr(List<BigInteger> flids) { public boolean batchDeleteFltr(List<String> flids) {
if(null!=flids){ if(null!=flids){
flids.removeAll(Collections.singleton(null)); flids.removeAll(Collections.singleton(null));
} }
@@ -1,6 +1,5 @@
package com.gzzn.omms.msgexchangeapi.service.flightInfo; package com.gzzn.omms.msgexchangeapi.service.flightInfo;
import java.math.BigInteger;
import java.util.List; import java.util.List;
import com.gzzn.omms.msgexchangeapi.entity.Cminmsg; import com.gzzn.omms.msgexchangeapi.entity.Cminmsg;
@@ -45,5 +44,5 @@ public interface IFlightInfoService {
* @param flids * @param flids
* @return * @return
*/ */
public boolean batchDeleteFltr(List<BigInteger> flids); public boolean batchDeleteFltr(List<String> flids);
} }