Commit 23da0361 by 傅伟强-富德

Update test.txt

1 parent 8040a610
Showing with 60 additions and 0 deletions
...@@ -301,3 +301,63 @@ filter { ...@@ -301,3 +301,63 @@ filter {
} }
} }
Date startDate = null;
boolean exists = redisUtil.exists(MyConstant.REDIS_GG_CHECKTIME);
Date nowDate=new Date();
//没有同步记录
if(!exists){
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
startDate = new Date(nowDate.getTime() - 660000L);
}else{
//存在记录
String lastGGTime = redisUtil.get(MyConstant.REDIS_GG_CHECKTIME).toString();
System.out.println("lastGGTime:"+lastGGTime);
startDate=DateUtil.getDateTimeFormat(lastGGTime.toString());
//更新本次同步时间
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
}
this.logUtils.info("本次地址解析数据起始时间:" + startDate);
// this.logUtils.info("本次地址解析数据结束时间:" + endDate);
try
{
List addressMapList = new ArrayList();
//Integer newPolicyCount = this.oraclePolicyService.countForNewPolicy(startDate);
//if ((newPolicyCount != null) && (newPolicyCount.intValue() != 0))
//{
List newPolices = this.oraclePolicyService.selectByDate(startDate);
if(newPolices!=null && newPolices.size()>0){
this.logUtils.info("增量--本次进行地址解析的总量是:" + newPolices.size());
handlePolicyList(addressMapList, newPolices);
this.logUtils.info("增量--用于解析的地址的量是:" + addressMapList.size());
bulkGeocodingGeo(addressMapList);
addressMapList.clear();
if (this.failedAddressList.size() > 0)
{
this.logUtils.info("增量--解析之前网络原因无法解析的地址信息----" + this.failedAddressList.size() + "条数据");
bulkGeocodingGeo(this.failedAddressList);
this.failedAddressList.clear();
}
this.logUtils.info("增量--本次地址解析结束,共计解析地址:" + newPolices.size());
}else{
this.logUtils.info("增量--本次地址解析结束,共计解析地址:0");
}
//}
//新增的处理完 处理更新的数据
syncUpdatedGeo(startDate);
}
catch (Exception e)
{
this.logUtils.error("syncPolicyGeo catch exception ==" + e);
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!