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
a3929ab4
Commit
a3929ab4
authored
Jun 03, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手动跑存数据bak1
parent
f2a36a7a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
84 deletions
+64
-84
BaiHangHistoryConstant.java
...cn/quantgroup/report/constant/BaiHangHistoryConstant.java
+7
-7
ExZhuDaiBaiHangReSendController.java
.../controller/external/ExZhuDaiBaiHangReSendController.java
+21
-0
SynLoanInfoHistoryTask.java
...java/cn/quantgroup/report/job/SynLoanInfoHistoryTask.java
+8
-8
RepaymentLoanInfoMapper.xml
...ntgroup/report/mapper/baihang/RepaymentLoanInfoMapper.xml
+28
-69
No files found.
src/main/java/cn/quantgroup/report/constant/BaiHangHistoryConstant.java
View file @
a3929ab4
...
@@ -21,17 +21,17 @@ public class BaiHangHistoryConstant {
...
@@ -21,17 +21,17 @@ public class BaiHangHistoryConstant {
public
static
final
int
MAX_COMMIT_COUT
=
24000
;
//大于2万条会出现事务提交过长报错
public
static
final
int
MAX_COMMIT_COUT
=
24000
;
//大于2万条会出现事务提交过长报错
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY
=
"
INSERT
xyqb_i_loan_a_m_history_bak "
+
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY
=
"
REPLACE INTO rc_syn_to_baihang_report.
xyqb_i_loan_a_m_history_bak "
+
" select * from xyqb_i_loan_application_manifest_history b "
+
" select * from
rc_real_time_data_pool_v2.
xyqb_i_loan_application_manifest_history b "
+
" where b.funding_corp_id in (420,520,580,650,670,810,240,640,700) "
+
" where b.funding_corp_id in (420,520,580,650,670,810,240,640,700) "
+
" and b.
created_at >= '##STARTTIME##' and b.cre
ated_at < '##ENDTIME##'; "
;
" and b.
updated_at >= '##STARTTIME##' and b.upd
ated_at < '##ENDTIME##'; "
;
//报送查询 b.loan_paid_at<@t2 公司打款时间
//报送查询 b.loan_paid_at<@t2 公司打款时间
public
static
final
String
SQL_COMMONE_TEMPLATE_PLAN
=
"
INSERT
xyqb_i_repayment_plan_bak "
+
public
static
final
String
SQL_COMMONE_TEMPLATE_PLAN
=
"
REPLACE INTO rc_syn_to_baihang_report.
xyqb_i_repayment_plan_bak "
+
"select a.* from xyqb_i_repayment_plan a "
+
"select a.* from
rc_real_time_data_pool_v2.
xyqb_i_repayment_plan a "
+
" join xyqb_i_loan_a_m_history_bak b "
+
" join
rc_syn_to_baihang_report.
xyqb_i_loan_a_m_history_bak b "
+
" on a.loan_application_history_id = b.loan_application_history_id "
+
" on a.loan_application_history_id = b.loan_application_history_id "
+
"where b.
created_at >= '##STARTTIME##' and b.cre
ated_at < '##ENDTIME##'; "
;
"where b.
updated_at >= '##STARTTIME##' and b.upd
ated_at < '##ENDTIME##'; "
;
//报送查询 a.repaid_at>=@t2 还款时间
//报送查询 a.repaid_at>=@t2 还款时间
...
...
src/main/java/cn/quantgroup/report/controller/external/ExZhuDaiBaiHangReSendController.java
View file @
a3929ab4
...
@@ -284,4 +284,25 @@ public class ExZhuDaiBaiHangReSendController {
...
@@ -284,4 +284,25 @@ public class ExZhuDaiBaiHangReSendController {
}
}
}
}
@RequestMapping
(
"/manual/syn_history_by_CreatedAt"
)
public
String
syn_history_by_CreatedAt
(
String
p3
,
String
secretKey
){
if
(
manualToolService
.
checkSecretKey
(
p3
,
secretKey
)){
//增量同步rc_real_time_data_pool_v2.xyqb_i_loan_application_manifest_history
synLoanInfoHistoryTask
.
syn_history_by_CreatedAt
();
return
"syn_history_by_CreatedAt任务调度完成"
;
}
else
{
return
"syn_history_by_CreatedAt任务调度失败,参数错误"
;
}
}
@RequestMapping
(
"/manual/syn_plan_by_CreatedAt"
)
public
String
syn_plan_by_CreatedAt
(
String
p3
,
String
secretKey
){
if
(
manualToolService
.
checkSecretKey
(
p3
,
secretKey
)){
//增量同步rc_real_time_data_pool_v2.xyqb_i_repayment_plan
synLoanInfoHistoryTask
.
syn_plan_by_CreatedAt
();
return
"syn_plan_by_CreatedAt任务调度完成"
;
}
else
{
return
"syn_plan_by_CreatedAt任务调度失败,参数错误"
;
}
}
}
}
src/main/java/cn/quantgroup/report/job/SynLoanInfoHistoryTask.java
View file @
a3929ab4
...
@@ -81,10 +81,10 @@ public class SynLoanInfoHistoryTask {
...
@@ -81,10 +81,10 @@ public class SynLoanInfoHistoryTask {
return
increment
<=
1
;
return
increment
<=
1
;
}
}
@Deprecated
p
rivate
void
syn_history_by_CreatedAt
(){
p
ublic
void
syn_history_by_CreatedAt
(){
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
"2016-08-23T00:00:00"
);
//
2016-08-23T16:29:10
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
"2016-08-23T00:00:00"
);
//
created_at=2016-08-23T16:29:10 updated_at=2016-08-23 16:34:43
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
"20
19-11-01T00:00:00"
);
//2019-11-11 12:32:08
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
"20
20-06-02T00:00:00"
);
//
int
counter
=
0
;
int
counter
=
0
;
while
(
true
)
{
while
(
true
)
{
Stopwatch
startwatch
=
Stopwatch
.
createStarted
();
Stopwatch
startwatch
=
Stopwatch
.
createStarted
();
...
@@ -114,10 +114,10 @@ public class SynLoanInfoHistoryTask {
...
@@ -114,10 +114,10 @@ public class SynLoanInfoHistoryTask {
}
}
}
}
@Deprecated
p
rivate
void
syn_plan_by_CreatedAt
(){
p
ublic
void
syn_plan_by_CreatedAt
(){
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
"2016-08-23T00:00:00"
);
//
2016-08-23T16:29:10
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
"2016-08-23T00:00:00"
);
//
created_at=2016-08-23T16:29:10 updated_at=2016-08-23 16:34:43
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
"20
19-11-01T00:00:00"
);
//2019-11-11 12:32:08
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
"20
20-06-02T00:00:00"
);
//
int
counter
=
0
;
int
counter
=
0
;
while
(
true
)
{
while
(
true
)
{
Stopwatch
startwatch
=
Stopwatch
.
createStarted
();
Stopwatch
startwatch
=
Stopwatch
.
createStarted
();
...
...
src/main/resources/cn/quantgroup/report/mapper/baihang/RepaymentLoanInfoMapper.xml
View file @
a3929ab4
This diff is collapsed.
Click to expand it.
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