Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
傅伟强-富德
/
test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 23da0361
authored
Jan 18, 2019
by
傅伟强-富德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.txt
1 parent
8040a610
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
test.txt
test.txt
View file @
23da036
...
...
@@ -300,4 +300,64 @@ 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);
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment