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
f84b590b
Commit
f84b590b
authored
Sep 07, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5514970f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
Common.java
src/main/java/cn/qg/qaplatform/process/Common.java
+0
-2
Lexin.java
src/main/java/cn/qg/qaplatform/process/Lexin.java
+4
-8
No files found.
src/main/java/cn/qg/qaplatform/process/Common.java
View file @
f84b590b
package
cn
.
qg
.
qaplatform
.
process
;
package
cn
.
qg
.
qaplatform
.
process
;
import
cn.qg.qaplatform.config.WebSocketServer
;
import
cn.qg.qaplatform.utils.DBUtils
;
import
cn.qg.qaplatform.utils.DBUtils
;
import
cn.qg.qaplatform.utils.Encrypt.LexinEncrypt
;
import
cn.qg.qaplatform.utils.Encrypt.LexinEncrypt
;
import
cn.qg.qaplatform.utils.HttpClientUtils
;
import
cn.qg.qaplatform.utils.HttpClientUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
...
...
src/main/java/cn/qg/qaplatform/process/Lexin.java
View file @
f84b590b
...
@@ -39,7 +39,6 @@ public class Lexin {
...
@@ -39,7 +39,6 @@ public class Lexin {
String
orderNo
=
"channel_order"
+
phoneNo
+
"_"
+
random
.
nextInt
(
9999
);
String
orderNo
=
"channel_order"
+
phoneNo
+
"_"
+
random
.
nextInt
(
9999
);
String
url
=
"http://qapi-"
+
namespace
+
".liangkebang.net/ex/api/v2/applyLoan/LEXIN"
;
String
url
=
"http://qapi-"
+
namespace
+
".liangkebang.net/ex/api/v2/applyLoan/LEXIN"
;
Map
<
String
,
Object
>
bizData
=
new
HashMap
<>();
Map
<
String
,
Object
>
bizData
=
new
HashMap
<>();
bizData
.
put
(
"orderNo"
,
orderNo
);
bizData
.
put
(
"orderNo"
,
orderNo
);
bizData
.
put
(
"userName"
,
userName
);
bizData
.
put
(
"userName"
,
userName
);
bizData
.
put
(
"idCardNo"
,
idCardNo
);
bizData
.
put
(
"idCardNo"
,
idCardNo
);
...
@@ -54,7 +53,7 @@ public class Lexin {
...
@@ -54,7 +53,7 @@ public class Lexin {
bizData
.
put
(
"workUnit"
,
"北京市测试公司"
);
bizData
.
put
(
"workUnit"
,
"北京市测试公司"
);
bizData
.
put
(
"industry"
,
"TRAFFIC"
);
bizData
.
put
(
"industry"
,
"TRAFFIC"
);
bizData
.
put
(
"loanDemandPurpose"
,
"FURNITURE_HOME"
);
bizData
.
put
(
"loanDemandPurpose"
,
"FURNITURE_HOME"
);
List
creditList
=
createCreditList
();
List
<
Map
>
creditList
=
createCreditList
();
bizData
.
put
(
"creditList"
,
creditList
);
bizData
.
put
(
"creditList"
,
creditList
);
bizData
.
put
(
"education"
,
"MASTER"
);
bizData
.
put
(
"education"
,
"MASTER"
);
bizData
.
put
(
"occupation"
,
"UNEMPLOYED"
);
bizData
.
put
(
"occupation"
,
"UNEMPLOYED"
);
...
@@ -83,8 +82,9 @@ public class Lexin {
...
@@ -83,8 +82,9 @@ public class Lexin {
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
content
.
put
(
"sign"
,
signStr
);
content
.
put
(
"sign"
,
signStr
);
content
.
put
(
"bizData"
,
bizDataStr
);
content
.
put
(
"bizData"
,
bizDataStr
);
log
.
info
(
"进件参数为:"
+
content
);
if
(!
StringUtils
.
isEmpty
(
symbol
))
{
if
(!
StringUtils
.
isEmpty
(
symbol
))
{
WebSocketServer
.
sendInfo
(
"进件参数为:
"
+
content
,
symbol
);
WebSocketServer
.
sendInfo
(
"进件参数为:
{}"
,
content
.
toString
()
);
}
}
String
contentStr
=
LexinEncrypt
.
encryptAndBase64Encode
(
JSONObject
.
toJSONString
(
content
),
AESKeywy
);
String
contentStr
=
LexinEncrypt
.
encryptAndBase64Encode
(
JSONObject
.
toJSONString
(
content
),
AESKeywy
);
...
@@ -92,11 +92,7 @@ public class Lexin {
...
@@ -92,11 +92,7 @@ public class Lexin {
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
"content="
+
contentStr
);
JSONObject
result
=
HttpClientUtils
.
doPost
(
url
,
"content="
+
contentStr
);
String
response
=
LexinEncrypt
.
decryptAfterBase64Decode
(
result
.
get
(
"content"
).
toString
(),
AESKeywy
);
String
response
=
LexinEncrypt
.
decryptAfterBase64Decode
(
result
.
get
(
"content"
).
toString
(),
AESKeywy
);
log
.
info
(
"乐信进件返回结果: {}"
,
JSONObject
.
parseObject
(
response
).
toString
());
if
(!
StringUtils
.
isEmpty
(
symbol
))
{
WebSocketServer
.
sendInfo
(
"进件响应为:"
+
response
,
symbol
);
}
log
.
info
(
"乐信进件返回结果:"
+
response
);
return
true
;
return
true
;
}
}
...
...
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