Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
baihang-report
Commits
762e934e
Commit
762e934e
authored
Nov 06, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改日志输出
parent
4abe36b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
25 deletions
+57
-25
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+57
-25
No files found.
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
762e934e
...
@@ -109,6 +109,8 @@ public class BaiHangZhuDaiService {
...
@@ -109,6 +109,8 @@ public class BaiHangZhuDaiService {
//测试环境报送,用户三要素需要脱敏
//测试环境报送,用户三要素需要脱敏
private
static
Map
<
String
,
String
>
testBaoSongUserInfoTuoMingMap
=
new
ConcurrentHashMap
<>();
private
static
Map
<
String
,
String
>
testBaoSongUserInfoTuoMingMap
=
new
ConcurrentHashMap
<>();
//联合贷产品上线时间,上线后才有数据
private
static
LocalDateTime
liang_he_dai_start
=
LocalDateTime
.
parse
(
"2019-10-25T00:00:00"
);
@PostConstruct
@PostConstruct
public
void
init
(){
public
void
init
(){
...
@@ -563,7 +565,7 @@ public class BaiHangZhuDaiService {
...
@@ -563,7 +565,7 @@ public class BaiHangZhuDaiService {
while
(
true
)
{
while
(
true
)
{
counter
++;
counter
++;
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
=
0
)
{
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
0
)
{
break
;
break
;
}
}
...
@@ -577,9 +579,13 @@ public class BaiHangZhuDaiService {
...
@@ -577,9 +579,13 @@ public class BaiHangZhuDaiService {
List
<
ApplyLoanInfoZhuDai
>
applyLoanInfoList
=
applyLoanInfoMapper
.
findRealTimeApplyLoanZhuDai
(
timeRecord
);
List
<
ApplyLoanInfoZhuDai
>
applyLoanInfoList
=
applyLoanInfoMapper
.
findRealTimeApplyLoanZhuDai
(
timeRecord
);
log
.
info
(
"申请存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
applyLoanInfoList
.
size
(),
starTime
,
(
queryWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
log
.
info
(
"申请存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
applyLoanInfoList
.
size
(),
starTime
,
(
queryWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
queryWatch2
=
Stopwatch
.
createStarted
();
List
<
ApplyLoanInfoZhuDai
>
applyLoanInfosLh
=
null
;
List
<
ApplyLoanInfoZhuDai
>
applyLoanInfosLh
=
applyLoanInfoMapper
.
findRealTimeApplyLoanZhuDaiLh
();
//联合贷产品上线时间,上线后才有数据
log
.
info
(
"申请存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
applyLoanInfosLh
.
size
(),
starTime
,
(
queryWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
if
(
erlyDate
.
plusDays
(
counter
-
1
).
compareTo
(
liang_he_dai_start
)
>=
0
){
Stopwatch
queryWatch2
=
Stopwatch
.
createStarted
();
applyLoanInfosLh
=
applyLoanInfoMapper
.
findRealTimeApplyLoanZhuDaiLh
();
log
.
info
(
"申请存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
applyLoanInfosLh
.
size
(),
starTime
,
(
queryWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
}
if
(
applyLoanInfoList
==
null
){
if
(
applyLoanInfoList
==
null
){
applyLoanInfoList
=
new
ArrayList
<
ApplyLoanInfoZhuDai
>();
applyLoanInfoList
=
new
ArrayList
<
ApplyLoanInfoZhuDai
>();
...
@@ -642,7 +648,7 @@ public class BaiHangZhuDaiService {
...
@@ -642,7 +648,7 @@ public class BaiHangZhuDaiService {
log
.
info
(
"开始>>百行-助贷放款存量数据整理, startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
log
.
info
(
"开始>>百行-助贷放款存量数据整理, startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
while
(
true
)
{
while
(
true
)
{
counter
++;
counter
++;
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
=
0
)
{
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
0
)
{
break
;
break
;
}
}
long
sUtc1
=
System
.
currentTimeMillis
();
long
sUtc1
=
System
.
currentTimeMillis
();
...
@@ -655,9 +661,16 @@ public class BaiHangZhuDaiService {
...
@@ -655,9 +661,16 @@ public class BaiHangZhuDaiService {
Stopwatch
queryWatch1
=
Stopwatch
.
createStarted
();
Stopwatch
queryWatch1
=
Stopwatch
.
createStarted
();
List
<
LoanInfoZhuDai
>
loanInfozdList
=
loanInfoMapper
.
findRealTimeLoanInfoZhuDai
(
timeRecord
);
List
<
LoanInfoZhuDai
>
loanInfozdList
=
loanInfoMapper
.
findRealTimeLoanInfoZhuDai
(
timeRecord
);
log
.
info
(
"放款存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
loanInfozdList
.
size
(),
starTime
,
(
queryWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
log
.
info
(
"放款存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
loanInfozdList
.
size
(),
starTime
,
(
queryWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
queryWatch2
=
Stopwatch
.
createStarted
();
List
<
LoanInfoZhuDai
>
loanInfozdListLh
=
loanInfoMapper
.
findRealTimeLoanInfoZhuDaiLh
();
List
<
LoanInfoZhuDai
>
loanInfozdListLh
=
null
;
log
.
info
(
"放款存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
loanInfozdListLh
.
size
(),
starTime
,
(
queryWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
//联合贷产品上线时间,上线后才有数据
if
(
erlyDate
.
plusDays
(
counter
-
1
).
compareTo
(
liang_he_dai_start
)
>=
0
){
Stopwatch
queryWatch2
=
Stopwatch
.
createStarted
();
loanInfozdListLh
=
loanInfoMapper
.
findRealTimeLoanInfoZhuDaiLh
();
log
.
info
(
"放款存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
loanInfozdListLh
.
size
(),
starTime
,
(
queryWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
}
if
(
loanInfozdList
==
null
){
if
(
loanInfozdList
==
null
){
loanInfozdList
=
new
ArrayList
<
LoanInfoZhuDai
>();
loanInfozdList
=
new
ArrayList
<
LoanInfoZhuDai
>();
}
}
...
@@ -743,7 +756,7 @@ public class BaiHangZhuDaiService {
...
@@ -743,7 +756,7 @@ public class BaiHangZhuDaiService {
log
.
info
(
"开始>>整理百行-助贷还款&逾期存量数据 startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
log
.
info
(
"开始>>整理百行-助贷还款&逾期存量数据 startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
while
(
true
)
{
while
(
true
)
{
counter
++;
counter
++;
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
=
0
)
{
if
(
erlyDate
.
plusDays
(
counter
).
compareTo
(
endDate
)
>
0
)
{
break
;
break
;
}
}
List
<
RepaymentInfoZhuDai
>
repaymentInfoList
=
new
ArrayList
<>();
List
<
RepaymentInfoZhuDai
>
repaymentInfoList
=
new
ArrayList
<>();
...
@@ -751,7 +764,7 @@ public class BaiHangZhuDaiService {
...
@@ -751,7 +764,7 @@ public class BaiHangZhuDaiService {
String
starTime
=
erlyDate
.
plusDays
(
counter
-
1
).
format
(
DateTimeFormatter
.
ISO_DATE
);
String
starTime
=
erlyDate
.
plusDays
(
counter
-
1
).
format
(
DateTimeFormatter
.
ISO_DATE
);
String
endTime
=
erlyDate
.
plusDays
(
counter
).
format
(
DateTimeFormatter
.
ISO_DATE
);
String
endTime
=
erlyDate
.
plusDays
(
counter
).
format
(
DateTimeFormatter
.
ISO_DATE
);
log
.
info
(
"整理百行-助贷还款&逾期 startTime: {} , endTime: {} "
,
starTime
,
endTime
);
log
.
info
(
"整理百行-助贷还款&逾期 startTime: {} , endTime: {}
------------
"
,
starTime
,
endTime
);
BaiHangTimeRecord
timeRecord
=
BaiHangTimeRecord
.
builder
().
startTime
(
starTime
).
endTime
(
endTime
).
build
();
BaiHangTimeRecord
timeRecord
=
BaiHangTimeRecord
.
builder
().
startTime
(
starTime
).
endTime
(
endTime
).
build
();
for
(
int
type
=
0
;
type
<
2
;
type
++)
{
for
(
int
type
=
0
;
type
<
2
;
type
++)
{
...
@@ -765,23 +778,24 @@ public class BaiHangZhuDaiService {
...
@@ -765,23 +778,24 @@ public class BaiHangZhuDaiService {
repaymentInfoList
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentInfo
(
timeRecord
);
repaymentInfoList
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentInfo
(
timeRecord
);
log
.
info
(
"还款存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeStopWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
log
.
info
(
"还款存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeStopWatch1
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
realTimeStopWatch2
=
Stopwatch
.
createStarted
();
//联合贷产品上线时间,上线后才有数据
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentInfoLh
(
timeRecord
);
if
(
erlyDate
.
plusDays
(
counter
-
1
).
compareTo
(
liang_he_dai_start
)
>=
0
){
log
.
info
(
"还款存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentLoanInfosLh
.
size
(),
starTime
,
(
realTimeStopWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
realTimeStopWatch2
=
Stopwatch
.
createStarted
();
}
else
{
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentInfoLh
(
timeRecord
);
/*if(erlyDate.plusDays(counter-1).compareTo(yq_start) >= 0){
log
.
info
(
"还款存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentLoanInfosLh
.
size
(),
starTime
,
(
realTimeStopWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch stopwatch = Stopwatch.createStarted();
}
repaymentInfoList = repaymentLoanInfoMapper.queryStockRepayMentInfoOverdueZhuDai(timeRecord);
log.info("百行-助贷还款查询逾期结束, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", starTime, endTime, repaymentInfoList.size(), (stopwatch.stop().elapsed(TimeUnit.MILLISECONDS)/1000)+".s");
}*/
}
else
{
Stopwatch
realTimeOverdueStopWatch3
=
Stopwatch
.
createStarted
();
Stopwatch
realTimeOverdueStopWatch3
=
Stopwatch
.
createStarted
();
repaymentInfoList
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdue
(
timeRecord
);
repaymentInfoList
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdue
(
timeRecord
);
log
.
info
(
"逾期存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeOverdueStopWatch3
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
log
.
info
(
"逾期存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeOverdueStopWatch3
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
realTimeOverdueStopWatch4
=
Stopwatch
.
createStarted
();
//联合贷产品上线时间,上线后才有数据
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdueLh
(
timeRecord
);
if
(
erlyDate
.
plusDays
(
counter
-
1
).
compareTo
(
liang_he_dai_start
)
>=
0
){
log
.
info
(
"逾期存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeOverdueStopWatch4
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
Stopwatch
realTimeOverdueStopWatch4
=
Stopwatch
.
createStarted
();
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdueLh
(
timeRecord
);
log
.
info
(
"逾期存量-联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeOverdueStopWatch4
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
}
}
}
if
(
repaymentInfoList
==
null
){
if
(
repaymentInfoList
==
null
){
...
@@ -803,14 +817,14 @@ public class BaiHangZhuDaiService {
...
@@ -803,14 +817,14 @@ public class BaiHangZhuDaiService {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"还款存量数据处理异常, startTime: {} , endTime: {} , type: {} "
,
starTime
,
endTime
,
type
,
e
);
log
.
error
(
"还款
&逾期
存量数据处理异常, startTime: {} , endTime: {} , type: {} "
,
starTime
,
endTime
,
type
,
e
);
}
}
//打印日志
//打印日志
if
(
type
==
0
)
{
if
(
type
==
0
)
{
log
.
info
(
"还款整理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
log
.
info
(
"
All
还款整理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
}
else
{
}
else
{
log
.
info
(
"逾期理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
log
.
info
(
"
All
逾期理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
}
}
}
}
...
@@ -1318,4 +1332,22 @@ public class BaiHangZhuDaiService {
...
@@ -1318,4 +1332,22 @@ public class BaiHangZhuDaiService {
}
}
}
}
/*public static void main(String[] args) {
LocalDateTime erlyDate = LocalDateTime.parse("2019-05-01T00:00:00");
LocalDateTime endDate = LocalDateTime.parse("2019-05-10T00:00:00");
int counter = 0;
while (true) {
counter++;
if (erlyDate.plusDays(counter).compareTo(endDate) > 0) {
break;
}
String starTime = erlyDate.plusDays(counter - 1).format(DateTimeFormatter.ISO_DATE);
String endTime = erlyDate.plusDays(counter).format(DateTimeFormatter.ISO_DATE);
System.out.println("starTime="+starTime+",endTime="+endTime);
}
}*/
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment