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
d436e7ca
Commit
d436e7ca
authored
Jan 21, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增vcc手动回调逻辑
parent
e32a8ec0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
Vcc.java
src/main/java/cn/qg/qaplatform/process/Vcc.java
+8
-3
VccDataServiceImpl.java
...ava/cn/qg/qaplatform/service/impl/VccDataServiceImpl.java
+17
-1
No files found.
src/main/java/cn/qg/qaplatform/process/Vcc.java
View file @
d436e7ca
...
...
@@ -192,7 +192,7 @@ public class Vcc {
/**
* 授信结果查询
*/
public
static
void
searchCreditResult
(
String
namespace
,
String
token
,
String
vccChannel
)
throws
URISyntaxException
{
public
static
Map
<
String
,
Object
>
searchCreditResult
(
String
namespace
,
String
token
,
String
vccChannel
)
throws
URISyntaxException
{
String
url
=
"https://talos-"
+
namespace
+
".liangkebang.net/vcc/xyqb_mall/credit_info"
;
Map
<
String
,
Object
>
headers
=
new
HashMap
<>();
headers
.
put
(
"x-auth-token"
,
token
);
...
...
@@ -200,6 +200,8 @@ public class Vcc {
headers
.
put
(
"content-type"
,
"application/x-www-form-urlencoded"
);
JSONObject
result
=
HttpClientUtils
.
doGetReturnJson
(
url
,
null
,
headers
);
log
.
info
(
"授信结果查询:"
+
result
);
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
result
.
get
(
"data"
);
return
map
;
}
/**
...
...
@@ -343,7 +345,10 @@ public class Vcc {
return
true
;
}
public
static
void
main
(
String
[]
args
)
throws
SQLException
{
vccWindControlCreditCallback
(
"vc2"
,
"1"
,
""
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Map
<
String
,
String
>
loginResult
=
login
(
"vcc3"
,
"18300000418"
,
"214"
,
"214"
);
String
uuid
=
loginResult
.
get
(
"uuid"
);
String
riskNo
=
getRiskNo
(
"vcc3"
,
uuid
);
vccWindControlCreditCallback
(
"vcc3"
,
"1"
,
riskNo
);
}
}
src/main/java/cn/qg/qaplatform/service/impl/VccDataServiceImpl.java
View file @
d436e7ca
...
...
@@ -85,7 +85,23 @@ public class VccDataServiceImpl implements VccDataService {
// 提交授信
Vcc
.
submitCredit
(
namespace
,
token
,
vccChannel
);
// 授信结果查询
Vcc
.
searchCreditResult
(
namespace
,
token
,
vccChannel
);
int
searchCreditCount
=
0
;
while
(
true
)
{
try
{
Thread
.
sleep
(
1000
);
searchCreditCount
++;
Map
<
String
,
Object
>
creditResult
=
Vcc
.
searchCreditResult
(
namespace
,
token
,
vccChannel
);
if
(
creditResult
.
get
(
"status"
).
equals
(
"1"
))
{
break
;
}
else
if
(
creditResult
.
get
(
"status"
).
equals
(
"0"
)
&&
searchCreditCount
==
10
)
{
String
riskNo
=
Vcc
.
getRiskNo
(
namespace
,
uuid
);
Vcc
.
vccWindControlCreditCallback
(
namespace
,
uuid
,
riskNo
);
break
;
}
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
if
(
status
==
1
||
status
==
2
)
{
log
.
info
(
"提交授信成功!"
);
Thread
.
sleep
(
2000
);
...
...
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