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 129ae299
authored
Jan 22, 2019
by
傅伟强-富德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.txt
1 parent
0781b6e4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
18 deletions
test.txt
test.txt
View file @
129ae29
...
...
@@ -303,38 +303,48 @@ filter {
Date startDate = null;
Date nowDate = new Date();
boolean exists = redisUtil.exists(MyConstant.REDIS_GG_CHECKTIME);
Date nowDate=new Date();
//没有同步记录
if(!exists){
try
{
if (!exists)
{
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
startDate = df.parse("2018-01-01");
nowDate = df.parse("2018-02-01");
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
startDate = new Date(nowDate.getTime() - 660000L);
}else{
startDate = new Date(startDate.getTime() - 660000L);
}
else
{
//存在记录
String lastGGTime = redisUtil.get(MyConstant.REDIS_GG_CHECKTIME).toString();
System.out.println("lastGGTime:"+lastGGTime);
startDate=DateUtil.getDateTimeFormat(lastGGTime.toString());
System.out.println("lastGGTime:" + lastGGTime);
startDate = DateUtil.getDateTimeFormat(lastGGTime);
//本次结束时间为上次结束时间增加一个月
nowDate=DateUtil.getDateTimeFormat(DateUtil.subMonth(lastGGTime));
//更新本次同步时间
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
}
this.logUtils.info("本次地址解析数据起始时间:" + startDate);
// this.logUtils.info("本次地址解析数据结束时间:" + end
Date);
this.logUtils.info("本次地址解析数据结束时间:" + now
Date);
try
{
List addressMapList = new ArrayList();
//Integer newPolicyCount = this.oraclePolicyService.countForNewPolicy(startDate);
//List<Map<String,String>> newPolices = this.oraclePolicyService.selectByDate(startDate);
/* Map<Integer,List> policyMap=new HashMap<Integer,List>();
//if ((newPolicyCount != null) && (newPolicyCount.intValue() != 0))
//{
List newPolices = this.oraclePolicyService.selectByDate(startDate);
if(newPolices!=null && newPolices.size()>0){
policyMap= batchesSync(policyMap,newPolices,3000);*/
List<Map<String,String>> newPolices=this.oraclePolicyService.getNewPolicyAddress(startDate, nowDate);
if (newPolices != null && newPolices.size() > 0)
{
this.logUtils.info("增量--本次进行地址解析的总量是:" + newPolices.size());
handlePolicyList(addressMapList, newPolices);
...
...
@@ -349,18 +359,23 @@ filter {
this.failedAddressList.clear();
}
this.logUtils.info("增量--本次地址解析结束,共计解析地址:" + newPolices.size());
}else{
}
else
{
this.logUtils.info("增量--本次地址解析结束,共计解析地址:0");
}
//}
//新增的处理完 处理更新的数据
syncUpdatedGeo(start
Date);
syncUpdatedGeo(startDate,now
Date);
}
catch (Exception e)
{
this.logUtils.error("syncPolicyGeo catch exception ==" + e);
}
}
catch (ParseException 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