Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform
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
QA
qa-platform
Commits
51710279
Commit
51710279
authored
Aug 28, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增云信
parent
4011e8e8
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
152 additions
and
75 deletions
+152
-75
FundEnum.java
src/main/java/cn/qg/qaplatform/common/enums/FundEnum.java
+2
-1
QueryBasicLoanStatusDataMapper.java
.../cn/qg/qaplatform/dao/QueryBasicLoanStatusDataMapper.java
+2
-0
MainProcess.java
src/main/java/cn/qg/qaplatform/process/xyqb/MainProcess.java
+11
-5
GenUserDataService.java
...ain/java/cn/qg/qaplatform/service/GenUserDataService.java
+1
-1
QueryBasicLoanStatusDataService.java
...g/qaplatform/service/QueryBasicLoanStatusDataService.java
+5
-0
GenUserDataServiceImpl.java
...cn/qg/qaplatform/service/impl/GenUserDataServiceImpl.java
+91
-62
QueryBasicLoanStatusDataServiceImpl.java
...orm/service/impl/QueryBasicLoanStatusDataServiceImpl.java
+6
-0
QueryBasicLoanStatusDataMapper.xml
src/main/resources/mapper/QueryBasicLoanStatusDataMapper.xml
+6
-0
xyqb.java
src/test/java/cn/qg/qaplatform/test/xyqb.java
+28
-6
No files found.
src/main/java/cn/qg/qaplatform/common/enums/FundEnum.java
View file @
51710279
...
@@ -5,7 +5,8 @@ package cn.qg.qaplatform.common.enums;
...
@@ -5,7 +5,8 @@ package cn.qg.qaplatform.common.enums;
*/
*/
public
enum
FundEnum
{
public
enum
FundEnum
{
GYXD
(
"广达小贷"
,
480
);
GYXD
(
"广达小贷"
,
480
),
YNXT
(
"云南信托"
,
1040
);
private
String
name
;
private
String
name
;
private
Integer
fundId
;
private
Integer
fundId
;
...
...
src/main/java/cn/qg/qaplatform/dao/QueryBasicLoanStatusDataMapper.java
View file @
51710279
...
@@ -70,4 +70,6 @@ public interface QueryBasicLoanStatusDataMapper {
...
@@ -70,4 +70,6 @@ public interface QueryBasicLoanStatusDataMapper {
Integer
getAssignFundIdByUserId
(
String
userId
);
Integer
getAssignFundIdByUserId
(
String
userId
);
GenLoanUser
getUserInfoByPhoneNo
(
String
phoneNo
);
GenLoanUser
getUserInfoByPhoneNo
(
String
phoneNo
);
Integer
getLoanProgressByUserId
(
String
userId
);
}
}
src/main/java/cn/qg/qaplatform/process/xyqb/MainProcess.java
View file @
51710279
...
@@ -350,6 +350,10 @@ public class MainProcess {
...
@@ -350,6 +350,10 @@ public class MainProcess {
fundInfoObject
.
put
(
"rateType"
,
1
);
fundInfoObject
.
put
(
"rateType"
,
1
);
fundInfoObject
.
put
(
"priority"
,
1
);
fundInfoObject
.
put
(
"priority"
,
1
);
fundInfoObject
.
put
(
"feeType"
,
1
);
fundInfoObject
.
put
(
"feeType"
,
1
);
// 如果是云南信托,需要该参数
if
(
fundId
==
1040
)
{
fundInfoObject
.
put
(
"fundProductId"
,
1061
);
}
fundInfoList
.
add
(
fundInfoObject
);
fundInfoList
.
add
(
fundInfoObject
);
firstTerm
.
put
(
"fundInfo"
,
fundInfoList
);
firstTerm
.
put
(
"fundInfo"
,
fundInfoList
);
terms
.
add
(
firstTerm
);
terms
.
add
(
firstTerm
);
...
@@ -509,7 +513,7 @@ public class MainProcess {
...
@@ -509,7 +513,7 @@ public class MainProcess {
/**
/**
* 二次风控
* 二次风控
*/
*/
public
static
boolean
externalQuotaOrderAuditNotify
(
String
namespace
,
String
token
,
String
uuid
,
Integer
loanId
,
Integer
bizType
)
{
public
static
boolean
externalQuotaOrderAuditNotify
(
String
namespace
,
String
token
,
String
uuid
,
Integer
loanId
,
Integer
bizType
,
boolean
auditResult
)
{
String
url
=
"http://clotho-"
+
namespace
+
".liangkebang.net"
+
"/external/quota/order_audit/notify"
;
String
url
=
"http://clotho-"
+
namespace
+
".liangkebang.net"
+
"/external/quota/order_audit/notify"
;
Map
<
String
,
Object
>
headers
=
new
HashMap
<>();
Map
<
String
,
Object
>
headers
=
new
HashMap
<>();
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
...
@@ -521,7 +525,7 @@ public class MainProcess {
...
@@ -521,7 +525,7 @@ public class MainProcess {
params
.
put
(
"uuid"
,
uuid
);
params
.
put
(
"uuid"
,
uuid
);
params
.
put
(
"bizNo"
,
loanId
);
params
.
put
(
"bizNo"
,
loanId
);
params
.
put
(
"bizType"
,
bizType
);
params
.
put
(
"bizType"
,
bizType
);
params
.
put
(
"auditResult"
,
true
);
params
.
put
(
"auditResult"
,
auditResult
);
params
.
put
(
"deadLine"
,
"1548518400"
);
params
.
put
(
"deadLine"
,
"1548518400"
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
params
,
headers
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
params
,
headers
);
log
.
info
(
"二次风控:"
+
result
);
log
.
info
(
"二次风控:"
+
result
);
...
@@ -735,9 +739,11 @@ public class MainProcess {
...
@@ -735,9 +739,11 @@ public class MainProcess {
Date
date
=
new
Date
();
Date
date
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
today
=
formatter
.
format
(
date
);
String
today
=
formatter
.
format
(
date
);
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
if
(
dataList
!=
null
)
{
if
(
dataList
.
get
(
i
).
get
(
"planDate"
).
toString
().
equals
(
today
))
{
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
flag
=
true
;
if
(
dataList
.
get
(
i
).
get
(
"planDate"
).
toString
().
equals
(
today
))
{
flag
=
true
;
}
}
}
}
}
log
.
info
(
"资金方是否已经分配:"
+
flag
);
log
.
info
(
"资金方是否已经分配:"
+
flag
);
...
...
src/main/java/cn/qg/qaplatform/service/GenUserDataService.java
View file @
51710279
...
@@ -25,7 +25,7 @@ public interface GenUserDataService {
...
@@ -25,7 +25,7 @@ public interface GenUserDataService {
* @param applyLoanInfo 造数据相关信息
* @param applyLoanInfo 造数据相关信息
* @return 成功或失败
* @return 成功或失败
*/
*/
boolean
withDraw
(
ApplyLoanInfo
applyLoanInfo
)
throws
Exception
;
boolean
withDraw
(
ApplyLoanInfo
applyLoanInfo
,
boolean
auditResult
)
throws
Exception
;
/**
/**
* 放款
* 放款
...
...
src/main/java/cn/qg/qaplatform/service/QueryBasicLoanStatusDataService.java
View file @
51710279
...
@@ -70,4 +70,9 @@ public interface QueryBasicLoanStatusDataService {
...
@@ -70,4 +70,9 @@ public interface QueryBasicLoanStatusDataService {
* 根据手机号查询用户信息
* 根据手机号查询用户信息
*/
*/
GenLoanUser
getUserInfoByPhoneNo
(
String
namespace
,
String
phoneNo
);
GenLoanUser
getUserInfoByPhoneNo
(
String
namespace
,
String
phoneNo
);
/**
* 根据userId获取用户放款状态
*/
Integer
getLoanProgressByUserId
(
String
namespace
,
String
userId
);
}
}
src/main/java/cn/qg/qaplatform/service/impl/GenUserDataServiceImpl.java
View file @
51710279
This diff is collapsed.
Click to expand it.
src/main/java/cn/qg/qaplatform/service/impl/QueryBasicLoanStatusDataServiceImpl.java
View file @
51710279
...
@@ -176,4 +176,10 @@ public class QueryBasicLoanStatusDataServiceImpl implements QueryBasicLoanStatus
...
@@ -176,4 +176,10 @@ public class QueryBasicLoanStatusDataServiceImpl implements QueryBasicLoanStatus
SwitchDataSource
.
dataSourceSwitch
(
namespace
,
"xyqb_user"
);
SwitchDataSource
.
dataSourceSwitch
(
namespace
,
"xyqb_user"
);
return
basicLoanStatusDataMapper
.
getUserInfoByPhoneNo
(
phoneNo
);
return
basicLoanStatusDataMapper
.
getUserInfoByPhoneNo
(
phoneNo
);
}
}
@Override
public
Integer
getLoanProgressByUserId
(
String
namespace
,
String
userId
)
{
SwitchDataSource
.
dataSourceSwitch
(
namespace
,
"xyqb"
);
return
basicLoanStatusDataMapper
.
getLoanProgressByUserId
(
userId
);
}
}
}
src/main/resources/mapper/QueryBasicLoanStatusDataMapper.xml
View file @
51710279
...
@@ -99,4 +99,10 @@
...
@@ -99,4 +99,10 @@
WHERE `phone_no` = #{phoneNo}
WHERE `phone_no` = #{phoneNo}
</select>
</select>
<!-- 根据用户id获取放款进度 -->
<select
id=
"getLoanProgressByUserId"
resultType=
"java.lang.Integer"
>
SELECT `progress` FROM `loan_application_history`
WHERE `user_id`=#{userId}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/test/java/cn/qg/qaplatform/test/xyqb.java
View file @
51710279
...
@@ -17,10 +17,10 @@ import java.util.List;
...
@@ -17,10 +17,10 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
public
class
xyqb
{
public
class
xyqb
{
public
static
String
namespace
=
"
pre
"
;
public
static
String
namespace
=
"
xyqb
"
;
public
static
Integer
channelId
=
1
;
public
static
Integer
channelId
=
1
;
public
static
Integer
fundId
=
48
0
;
public
static
Integer
fundId
=
104
0
;
public
static
String
phone
=
"18300
000378
"
;
public
static
String
phone
=
"18300
120382
"
;
public
static
String
token
=
""
;
public
static
String
token
=
""
;
public
static
String
uuid
=
""
;
public
static
String
uuid
=
""
;
public
static
Long
userId
;
public
static
Long
userId
;
...
@@ -307,6 +307,7 @@ public class xyqb {
...
@@ -307,6 +307,7 @@ public class xyqb {
JSONArray
financeProducts
=
createFinanceProducts
();
JSONArray
financeProducts
=
createFinanceProducts
();
params
.
put
(
"financeProducts"
,
financeProducts
);
params
.
put
(
"financeProducts"
,
financeProducts
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
params
,
headers
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
params
,
headers
);
System
.
out
.
println
(
"风控授信回调参数:"
+
params
);
System
.
out
.
println
(
"风控授信回调:"
+
result
);
System
.
out
.
println
(
"风控授信回调:"
+
result
);
}
}
...
@@ -328,6 +329,10 @@ public class xyqb {
...
@@ -328,6 +329,10 @@ public class xyqb {
fundInfoObject
.
put
(
"rateType"
,
1
);
fundInfoObject
.
put
(
"rateType"
,
1
);
fundInfoObject
.
put
(
"priority"
,
1
);
fundInfoObject
.
put
(
"priority"
,
1
);
fundInfoObject
.
put
(
"feeType"
,
1
);
fundInfoObject
.
put
(
"feeType"
,
1
);
// 云信判断
if
(
fundId
==
1040
)
{
fundInfoObject
.
put
(
"fundProductId"
,
1061
);
}
fundInfoList
.
add
(
fundInfoObject
);
fundInfoList
.
add
(
fundInfoObject
);
firstTerm
.
put
(
"fundInfo"
,
fundInfoList
);
firstTerm
.
put
(
"fundInfo"
,
fundInfoList
);
terms
.
add
(
firstTerm
);
terms
.
add
(
firstTerm
);
...
@@ -628,15 +633,28 @@ public class xyqb {
...
@@ -628,15 +633,28 @@ public class xyqb {
Date
date
=
new
Date
();
Date
date
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
today
=
formatter
.
format
(
date
);
String
today
=
formatter
.
format
(
date
);
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
if
(
dataList
!=
null
)
{
if
(
dataList
.
get
(
i
).
get
(
"planDate"
).
toString
().
equals
(
today
))
{
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
flag
=
true
;
if
(
dataList
.
get
(
i
).
get
(
"planDate"
).
toString
().
equals
(
today
))
{
flag
=
true
;
}
}
}
}
}
System
.
out
.
println
(
"资金方是否已经分配:"
+
flag
);
System
.
out
.
println
(
"资金方是否已经分配:"
+
flag
);
return
flag
;
return
flag
;
}
}
/**
* 云信插入银行卡
*/
public
static
void
insertBankCardOfYunxing
()
throws
SQLException
{
String
sql
=
"INSERT INTO `card_check_record`(`user_id`, `card_no`, `bank_code`, `bank_name`, `branch_no`, `branch_name`, `province`, `city`, `card_type`, `is_active`, `created_at`, `updated_at`) VALUES ("
+
userId
+
", '6222988108217968', 'PINGAN', '平安银行', NULL, NULL, NULL, NULL, 2, 1, '2020-08-13 14:04:27', '2020-08-13 14:04:27');"
;
System
.
out
.
println
(
sql
);
DBUtils
dbUtils
=
new
DBUtils
(
namespace
,
"payment_center"
,
"qa"
,
"qatest"
);
Integer
result
=
dbUtils
.
insert
(
sql
);
System
.
out
.
println
(
"云信插入银行卡结果:"
+
result
);
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// 分配资金方
// 分配资金方
...
@@ -651,6 +669,10 @@ public class xyqb {
...
@@ -651,6 +669,10 @@ public class xyqb {
// 授信
// 授信
login
();
login
();
checkUserId
();
checkUserId
();
// 如果是云信,则需要插入银行卡
if
(
fundId
==
1040
)
{
insertBankCardOfYunxing
();
}
syncSessionToXyqb
();
syncSessionToXyqb
();
creditSessionSync
();
creditSessionSync
();
realNameVerified
();
realNameVerified
();
...
...
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