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
f106ec05
Commit
f106ec05
authored
Sep 23, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
701af9b6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
86 deletions
+87
-86
ApplyDataVo.java
src/main/java/cn/qg/qaplatform/domain/ApplyDataVo.java
+5
-5
Common.java
src/main/java/cn/qg/qaplatform/process/Common.java
+3
-3
Lexin.java
src/main/java/cn/qg/qaplatform/process/Lexin.java
+4
-4
Xyqb.java
src/main/java/cn/qg/qaplatform/process/Xyqb.java
+1
-1
LexinDataServiceImpl.java
...a/cn/qg/qaplatform/service/impl/LexinDataServiceImpl.java
+9
-8
Lexin.java
src/test/java/cn/qg/qaplatform/test/Lexin.java
+6
-6
Xyqb.java
src/test/java/cn/qg/qaplatform/test/Xyqb.java
+59
-59
No files found.
src/main/java/cn/qg/qaplatform/domain/ApplyDataVo.java
View file @
f106ec05
...
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
javax.validation.constraints.NotNull
;
/**
* 造
Xyqb
数据传递的参数实体类
* 造数据传递的参数实体类
*/
@Data
public
class
ApplyDataVo
{
...
...
@@ -27,8 +27,6 @@ public class ApplyDataVo {
private
Integer
term
=
3
;
private
Integer
rate
;
private
String
name
=
"刘志国"
;
private
String
idCardNo
=
"330212198511195794"
;
...
...
@@ -39,9 +37,11 @@ public class ApplyDataVo {
private
String
bankCode
=
"CCB"
;
private
Integer
fixedBillDay
=
2
;
private
String
rate
=
"31.86"
;
private
String
fixedBillDay
=
"2"
;
private
Integer
fixedRepayDay
=
12
;
private
String
fixedRepayDay
=
"12"
;
/**
* websocket通信标志位
*/
...
...
src/main/java/cn/qg/qaplatform/process/Common.java
View file @
f106ec05
...
...
@@ -78,10 +78,10 @@ public class Common {
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
"content="
+
contentStr
);
String
response
=
LexinEncrypt
.
decryptAfterBase64Decode
(
result
.
get
(
"content"
).
toString
(),
AESKeywy
);
if
(!
StringUtils
.
isEmpty
(
symbol
))
{
WebSocketServer
.
sendInfo
(
"提现参数为:"
+
content
Str
,
symbol
);
WebSocketServer
.
sendInfo
(
"提现结果为:"
+
contentStr
,
symbol
);
WebSocketServer
.
sendInfo
(
"提现参数为:"
+
content
,
symbol
);
WebSocketServer
.
sendInfo
(
"提现结果为:"
+
result
,
symbol
);
}
log
.
info
(
"提现后结果为:"
+
res
ponse
);
log
.
info
(
"提现后结果为:"
+
res
ult
);
return
true
;
}
...
...
src/main/java/cn/qg/qaplatform/process/Lexin.java
View file @
f106ec05
...
...
@@ -31,9 +31,9 @@ public class Lexin {
String
idCardNo
=
applyDataVo
.
getIdCardNo
();
Integer
amount
=
applyDataVo
.
getAmount
();
Integer
term
=
applyDataVo
.
getTerm
();
Integer
rate
=
applyDataVo
.
getRate
();
Integer
fixedBillDay
=
applyDataVo
.
getFixedBillDay
();
Integer
fixedRepayDay
=
applyDataVo
.
getFixedRepayDay
();
String
rate
=
applyDataVo
.
getRate
();
String
fixedBillDay
=
applyDataVo
.
getFixedBillDay
();
String
fixedRepayDay
=
applyDataVo
.
getFixedRepayDay
();
String
symbol
=
applyDataVo
.
getSymbol
();
String
orderNo
=
"channel_order"
+
phoneNo
+
"_"
+
random
.
nextInt
(
9999
);
...
...
@@ -128,7 +128,7 @@ public class Lexin {
return
authInfo
;
}
public
static
Map
<
String
,
Object
>
createScenarioData
(
Integer
amount
,
Integer
term
,
Integer
rate
,
Integer
fixedBillDay
,
Integer
fixedRepayDay
)
{
public
static
Map
<
String
,
Object
>
createScenarioData
(
Integer
amount
,
Integer
term
,
String
rate
,
String
fixedBillDay
,
String
fixedRepayDay
)
{
Map
<
String
,
Object
>
scenarioData
=
new
HashMap
<>();
Map
<
String
,
Object
>
auditInfo
=
new
HashMap
<>();
Map
<
String
,
Object
>
extra
=
new
HashMap
<>();
...
...
src/main/java/cn/qg/qaplatform/process/Xyqb.java
View file @
f106ec05
...
...
@@ -570,7 +570,7 @@ public class Xyqb {
Map
data
=
(
Map
)
result
.
get
(
"data"
);
String
opToken
=
data
.
get
(
"token"
).
toString
();
if
(
symbol
!=
null
)
{
WebSocketServer
.
sendInfo
(
"登录OP,获取token:"
,
symbol
);
WebSocketServer
.
sendInfo
(
"登录OP,获取token:"
+
opToken
,
symbol
);
}
return
opToken
;
}
...
...
src/main/java/cn/qg/qaplatform/service/impl/LexinDataServiceImpl.java
View file @
f106ec05
package
cn
.
qg
.
qaplatform
.
service
.
impl
;
import
cn.qg.qaplatform.common.enums.ChannelEnum
;
import
cn.qg.qaplatform.config.WebSocketServer
;
import
cn.qg.qaplatform.domain.ApplyDataVo
;
import
cn.qg.qaplatform.process.Common
;
import
cn.qg.qaplatform.process.Lexin
;
...
...
@@ -9,7 +8,6 @@ import cn.qg.qaplatform.process.Xyqb;
import
cn.qg.qaplatform.service.QueryInProcessStatusService
;
import
cn.qg.qaplatform.service.LexinDataService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -42,12 +40,18 @@ public class LexinDataServiceImpl implements LexinDataService {
boolean
fundAssignResult
=
Common
.
assignFundCorp
(
namespace
,
fundId
);
// 进件
boolean
createOrderResult
=
Lexin
.
createOrder
(
applyDataVo
);
setUserStatusRedisValue
(
namespace
,
phoneNo
,
0
);
if
(!
createOrderResult
)
{
return
false
;
}
String
token
=
Xyqb
.
login
(
namespace
,
1
,
phoneNo
);
Map
userInfoResult
=
Xyqb
.
checkUserId
(
namespace
,
phoneNo
);
String
uuid
=
userInfoResult
.
get
(
"uuid"
).
toString
();
String
userId
=
userInfoResult
.
get
(
"id"
).
toString
();
String
channelOrderNo
=
Common
.
queryChannelOrderNoByPhone
(
namespace
,
phoneNo
,
ChannelEnum
.
LEXIN
.
getChannelId
());
Common
.
channelOrderApprove
(
namespace
,
channelOrderNo
,
amount
,
"0"
,
true
,
term
);
// 风控授信回调
// Xyqb.creditAuthNotify(namespace, token, uuid, ChannelEnum.LEXIN.getChannelId(), fundId, channelOrderNo, 0, true, amount, term);
setUserStatusRedisValue
(
namespace
,
phoneNo
,
0
);
// 查询到资方分配成功才进行下一步
queryInProcessStatusService
.
queryFundingAssignProgress
(
namespace
,
phoneNo
,
fundId
,
symbol
);
// api提现
...
...
@@ -57,12 +61,9 @@ public class LexinDataServiceImpl implements LexinDataService {
}
setUserStatusRedisValue
(
namespace
,
phoneNo
,
2
);
// 二次风控
String
token
=
Xyqb
.
login
(
namespace
,
1
,
phoneNo
);
Map
userInfoResult
=
Xyqb
.
checkUserId
(
namespace
,
phoneNo
);
String
uuid
=
userInfoResult
.
get
(
"uuid"
).
toString
();
String
userId
=
userInfoResult
.
get
(
"id"
).
toString
();
Integer
loanId
=
Common
.
queryLoanId
(
namespace
,
phoneNo
,
ChannelEnum
.
LEXIN
.
getChannelId
());
boolean
secondWindControlResult
=
Xyqb
.
externalQuotaOrderAuditNotify
(
namespace
,
1
,
token
,
uuid
,
loanId
,
11
,
true
);
Xyqb
.
modifyContactStatus
(
namespace
,
userId
);
// 放款
String
opToken
=
Xyqb
.
loginOP
(
namespace
);
...
...
@@ -74,7 +75,7 @@ public class LexinDataServiceImpl implements LexinDataService {
Xyqb
.
modifyWaitingFundingCreatedAt
(
namespace
,
loanId
);
Thread
.
sleep
(
5000
);
// 直接打款
Xyqb
.
fundsPlanLoanApply
(
namespace
,
opToken
,
fundId
,
money
,
people
);
Xyqb
.
fundsPlanLoanApply
(
namespace
,
opToken
,
fundId
,
money
,
people
);
Thread
.
sleep
(
30000
);
// 放款结果通知
boolean
makeLoanResult
=
Xyqb
.
payNotify
(
namespace
,
loanId
,
true
);
...
...
src/test/java/cn/qg/qaplatform/test/Lexin.java
View file @
f106ec05
...
...
@@ -16,18 +16,18 @@ public class Lexin {
public
static
String
MD5Keywy
=
"qEAxMJBv"
;
public
static
String
AESKeywy
=
"sxD8KO79EDK0N0AJ"
;
public
static
String
namespace
=
"pre"
;
public
static
String
phoneNo
=
"1
3253223847
"
;
public
static
String
phoneNo
=
"1
8995803991
"
;
public
static
String
orderNo
=
"channel_order"
+
phoneNo
+
"_"
+
random
.
nextInt
(
9999
);
public
static
String
userName
=
"
柯友安
"
;
public
static
String
idCardNo
=
"
460202197905166525
"
;
public
static
String
userName
=
"
陆康盛
"
;
public
static
String
idCardNo
=
"
530827197906309549
"
;
public
static
Integer
amount
=
10000
;
public
static
Integer
term
=
3
;
public
static
String
rate
=
"31.86"
;
public
static
String
fixedBillDay
=
"2"
;
public
static
String
fixedRepayDay
=
"12"
;
public
static
String
bankCardNo
=
"62
28270172922504353
"
;
public
static
String
bankCode
=
"
ABC
"
;
public
static
String
bankName
=
"中国
农业
银行"
;
public
static
String
bankCardNo
=
"62
17003252470844018
"
;
public
static
String
bankCode
=
"
CCB
"
;
public
static
String
bankName
=
"中国
建设
银行"
;
/**
* 进件
...
...
src/test/java/cn/qg/qaplatform/test/Xyqb.java
View file @
f106ec05
...
...
@@ -17,10 +17,10 @@ import java.util.List;
import
java.util.Map
;
public
class
Xyqb
{
public
static
String
namespace
=
"
pre
"
;
public
static
String
namespace
=
"
vcc2
"
;
public
static
Integer
channelId
=
1
;
public
static
Integer
fundId
=
101
0
;
public
static
String
phone
=
"1
303925217
0"
;
public
static
Integer
fundId
=
48
0
;
public
static
String
phone
=
"1
830000012
0"
;
public
static
String
token
=
""
;
public
static
String
uuid
=
""
;
public
static
Long
userId
;
...
...
@@ -33,10 +33,10 @@ public class Xyqb {
public
static
String
orderNo
=
""
;
public
static
Integer
bizType
=
0
;
public
static
String
auditResult
=
"true"
;
public
static
String
creditAmount
=
"
96
00"
;
// 授信时返回的额度
public
static
Integer
maxAmount
=
96
00
;
// 提现时的额度,
public
static
String
creditAmount
=
"
100
00"
;
// 授信时返回的额度
public
static
Integer
maxAmount
=
100
00
;
// 提现时的额度,
public
static
Integer
minAmount
=
1000
;
//
public
static
Integer
term
=
12
;
public
static
Integer
term
=
6
;
public
static
Long
accountId
;
public
static
String
payToken
=
""
;
public
static
String
cardNo
=
"6228220000020362026"
;
...
...
@@ -663,59 +663,59 @@ public class Xyqb {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
//
分配资金方
//
loginFundOP();
//
unblockLoan();
//
boolean result = assignFundOrNot();
//
if (!result) {
//
setFundPlan();
//
unblockLoan();
//
}
//
//
//
授信
//
login();
//
checkUserId();
//
// 如果是云信,则需要插入银行卡
//
if (fundId == 1040) {
//
insertBankCardOfYunxing();
//
}
//
syncSessionToXyqb();
//
creditSessionSync();
//
realNameVerified();
//
authBasicInfo();
//
enterAuthOcr();
//
uploadFrontOfIdCard();
//
uploadBackOfIdCard();
//
submitPhotoAuth();
//
credit();
//
submitAudit();
//
queryUserAuditRecord();
//
creditAuthNotify();
//
Thread.sleep(180000);
// 绑卡提现
//
login();
//
checkUserId();
//
syncSessionToXyqb();
//
loginWithDrawPage();
//
getUserAccountId();
//
bindCard();
//
cardAuthSms();
//
cardAuthSmsConfirm();
//
getBindCardList();
//
createLoan();
//
externalQuotaOrderAuditNotify();
//
modifyContactStatus();
//
Thread.sleep(10000);
//
//
// 放款
//
loginOP();
//
checkWaitingFundingCorpOperatePeople();
//
modifyWaitingFundingCreatedAt();
//
Thread.sleep(10000);
//
fundsPlanLoanApply();
//
Thread.sleep(10000);
//
payNotify();
//
分配资金方
loginFundOP
();
unblockLoan
();
boolean
result
=
assignFundOrNot
();
if
(!
result
)
{
setFundPlan
();
unblockLoan
();
}
// 授信
login
();
checkUserId
();
// 如果是云信,则需要插入银行卡
if
(
fundId
==
1040
)
{
insertBankCardOfYunxing
();
}
syncSessionToXyqb
();
creditSessionSync
();
realNameVerified
();
authBasicInfo
();
enterAuthOcr
();
uploadFrontOfIdCard
();
uploadBackOfIdCard
();
submitPhotoAuth
();
credit
();
submitAudit
();
queryUserAuditRecord
();
creditAuthNotify
();
Thread
.
sleep
(
180000
);
//
绑卡提现
login
();
checkUserId
();
syncSessionToXyqb
();
loginWithDrawPage
();
getUserAccountId
();
bindCard
();
cardAuthSms
();
cardAuthSmsConfirm
();
getBindCardList
();
createLoan
();
externalQuotaOrderAuditNotify
();
modifyContactStatus
();
Thread
.
sleep
(
10000
);
// 放款
loginOP
();
checkWaitingFundingCorpOperatePeople
();
modifyWaitingFundingCreatedAt
();
Thread
.
sleep
(
10000
);
fundsPlanLoanApply
();
Thread
.
sleep
(
10000
);
payNotify
();
}
}
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