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
6d785121
Commit
6d785121
authored
Nov 14, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工具修改
parent
63007210
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
214 additions
and
19 deletions
+214
-19
BaiHangHistoryConstant.java
...cn/quantgroup/report/constant/BaiHangHistoryConstant.java
+60
-0
LoanApplicationManifestHistoryTask.java
...tgroup/report/job/LoanApplicationManifestHistoryTask.java
+154
-19
No files found.
src/main/java/cn/quantgroup/report/constant/BaiHangHistoryConstant.java
0 → 100644
View file @
6d785121
package
cn
.
quantgroup
.
report
.
constant
;
/**
* -----------------------------------------------------------------------------<br>
* 描述: <br>
* 作者: Administrator <br>
* 时间: 2019.11.14 10:56 <br>
* 授权: (C) Copyright (c) 2017 <br>
* 公司: 北京众信利民信息技术有限公司 <br>
* -----------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------<br>
* 描述: <br>
* 作者:yanhui.Hao <br>
* 时间:2019.11.14 <br>
* 授权: (C) Copyright (c) 2017 <br>
* 公司: 北京众信利民信息技术有限公司 <br>
* -----------------------------------------------------------------------------
*/
public
class
BaiHangHistoryConstant
{
public
static
final
int
MAX_COMMIT_COUT
=
20000
;
//大于2万条会出现事务提交过长报错
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY
=
"INSERT xyqb_i_loan_a_m_history_bak "
+
" select * from xyqb_i_loan_application_manifest_history b "
+
" where b.funding_corp_id in (420,520,580,650,670,810,240,640,700) "
+
" and b.created_at >= '##STARTTIME##' and b.created_at < '##ENDTIME##'; "
;
//报送查询 b.loan_paid_at<@t2 公司打款时间
public
static
final
String
SQL_COMMONE_TEMPLATE_PLAN
=
"INSERT xyqb_i_repayment_plan_bak "
+
"select a.* from xyqb_i_repayment_plan a "
+
" join xyqb_i_loan_a_m_history_bak b "
+
" on a.loan_application_history_id = b.loan_application_history_id "
+
"where b.created_at >= '##STARTTIME##' and b.created_at < '##ENDTIME##'; "
;
//报送查询 a.repaid_at>=@t2 还款时间
//---------------------根据id去同步---------------------------
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY_BAK_MAX_ID
=
"select MAX(b.id) as bakMaxId from xyqb_i_loan_a_m_history_bak b; "
;
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY_SYN_COUNT
=
"select count(b.id) from xyqb_i_loan_application_manifest_history b "
+
" where b.funding_corp_id in (420,520,580,650,670,810,240,640,700) "
+
" and b.id > ##BAKMAXID## ;"
;
public
static
final
String
SQL_COMMONE_TEMPLATE_HISTORY_SYN_DATA
=
" INSERT xyqb_i_loan_a_m_history_bak "
+
" select b.* from xyqb_i_loan_application_manifest_history b "
+
" where b.funding_corp_id in (420,520,580,650,670,810,240,640,700) "
+
" and b.id > ##STARTID## "
;
//AND b.id <= ##ENDID##
public
static
final
String
SQL_COMMONE_TEMPLATE_PLAN_SYN_COUNT
=
"select count(a.id) from xyqb_i_repayment_plan a "
+
" join xyqb_i_loan_a_m_history_bak b on a.loan_application_history_id = b.loan_application_history_id "
+
" where b.id > ##BAKMAXID##;"
;
public
static
final
String
SQL_COMMONE_TEMPLATE_PLAN_SYN_DATA
=
"INSERT xyqb_i_repayment_plan_bak "
+
"select a.* from xyqb_i_repayment_plan a "
+
" join xyqb_i_loan_a_m_history_bak b on a.loan_application_history_id = b.loan_application_history_id "
+
" where b.id > ##STARTID## "
;
//AND b.id <= ##ENDID##
}
src/main/java/cn/quantgroup/report/job/LoanApplicationManifestHistoryTask.java
View file @
6d785121
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