Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
zhanhai
windows
Commits
4749f81c
Commit
4749f81c
authored
Oct 27, 2023
by
张庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最受结果
parent
222f2d03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
ProtocolJob.java
src/main/java/com/jqtx/windows/job/ProtocolJob.java
+1
-1
AbcHttpClient.java
src/main/java/com/jqtx/windows/utils/AbcHttpClient.java
+17
-15
No files found.
src/main/java/com/jqtx/windows/job/ProtocolJob.java
View file @
4749f81c
...
...
@@ -52,7 +52,7 @@ public class ProtocolJob {
thirdCredit
.
put
(
"loanNo"
,
loanModel
.
getLoanNo
());
thirdCredit
.
put
(
"transNo"
,
IdUtil
.
fastSimpleUUID
());
thirdCredit
.
put
(
"contractFileUrl"
,
path
);
ZyJsonResult
zyJsonResult
=
abcHttpClient
.
postRequest
(
thirdCredit
.
toJSONString
(),
ZNPostUrlEnum
.
CREDIT_QUERY
.
getCode
());
ZyJsonResult
zyJsonResult
=
abcHttpClient
.
postRequest
(
thirdCredit
.
toJSONString
(),
ZNPostUrlEnum
.
PROTOCOL_CALL
.
getCode
());
log
.
info
(
"zyJsonResult:[{}]"
,
JSONObject
.
toJSONString
(
zyJsonResult
));
p
.
setCreditThirdToken
(
"FINISHED"
);
creditComponent
.
updateByOrderNo
(
p
.
getOrderNo
(),
p
);
...
...
src/main/java/com/jqtx/windows/utils/AbcHttpClient.java
View file @
4749f81c
...
...
@@ -90,23 +90,25 @@ public class AbcHttpClient {
try
{
//授信查询接口demo
String
param
=
"{\"
reqNo\":\"xiaohua_fenrun_test2023102410321602621101\",\"type\":\"01
\"}"
;
String
param
=
"{\"
loanNo\":\"xhfr202310277006101\",\"orderNo\":\"202310277006\",\"status\":1,\"transNo\":\"5adb96b453674e7a8a477df5b8c8ace3
\"}"
;
String
ypdPublicKey
=
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmjHH4WCuyKPDDY4gp6DJatkCdhyScKQLytmug5ITGQBlUaWINosmx9PhBU+B4YNrrZ/XvQb7AWKz5jX2ZxTlGJ4FuAsE1lNg4FPpQe/v/MjQCnE/tWqrB41apFeTMXaDSH3ceDusOxU2fsgrltzcgjMT6NCLNv1nVpFaO7UwRlidQHXGxPxgleQmDqooQCPzalb3kW1ipkmAc83XKKktNBOQuKtDJKdZjmlDMKGeXWAMyYtdMquNEei/fo9FDNcLuisClujtxsDnknagC+aza5uRgraAz993LRBnzthS2sdSr++d/Qn1UvonKDpCodp9sLpIAyxUP3xrQXFLDwDa9wIDAQAB"
;
String
privateKey
=
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCjsStBwFdO7D71socDAtlaoo/iHN29nooYWZTFWnmafp9vNhHk5TWLQuy5IfRklKFqKqFw7J2K3fN0zXNf9Mhji9BAJjknw6uSL2xSyoqYsKPEAi+/LxGYnlX3YpNQ9kONe4FMm/182LnqpMLQd4Iury6pMPGQz/uGJ2BY+PQ6wY+fTICYt1IXg41xjlqhwZSmyktQTMc0xVa92+4lztXJcfAvRRUOQiHUVqS8W1un7DuOu+wNCsJmwLF+XzycEYHDzWPgybhm1NHRz7JWpF/uowtpQnb7Kjl53e0B35fyeUeg6mpsmPdDW/hmfASYaw+vj6e+ff1WB3D/NNFXSxHjAgMBAAECggEAIzSEeCS04l1/APq/fM9NDeguh9PrgM+rJaeG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0m91CVjxwFmyM2dfIXglvYAhR9LfSr8vWnhuTxtBf6V67fX/Xt8Q1EKBUL6FN5XA75+i6j5nHX3m9O0XRbgnU8fcnawmerzrMhMo=\n"
;
String
result
=
send
(
param
,
"http://115.238.89.106:8888"
+
"/openapi"
,
ypdPublicKey
,
privateKey
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
String
sign
=
jsonObject
.
getString
(
"sign"
);
String
data
=
jsonObject
.
getString
(
"data"
);
/*验签*/
boolean
f
=
SignUtil
.
veriSign
(
data
,
sign
,
AbcRsaUtil
.
getPublicKey
(
ypdPublicKey
));
if
(
f
)
{
//data = "LbfVKZfHTWm0S6h81XLAgv8zRmUwljGCznpVln1be2oiuXH1vw00sPW2uA5iOJND0d+5KtCzT8O3xD4avg4qEHvwlUWDZ7nFCqs5y5X470MCSwyxrH1UbBGLNlrfiq8yWmz5eKcxlyjyhLy46IuVqpJlxZ8hP3yU2gObcACuT8YmiVgzPvzefomyF+YalaFf9l7kObTvmfayVfugC1vCvYDyIWlNs9BUeHpPboo8KUUMi7E7e/jIpunCSSd7fF7Sh3rziwa+170cZfE5wrkJ/m4cvHzK86kCzDrIOABbhuvTFIpaUs8SFNujV2E6YP6jxYJ2FR8IlgMS/W/B4fX7dQ==";
String
dec
=
EncryptUtil
.
decrypt
(
data
,
AbcRsaUtil
.
getPrivateKey
(
privateKey
));
System
.
out
.
println
(
"解密后返回数据:"
+
dec
);
}
else
{
System
.
out
.
println
(
"验签异常"
);
}
String
responseParam
=
EncryptUtil
.
encrypt
(
param
,
AbcRsaUtil
.
getPublicKey
(
ypdPublicKey
));
System
.
out
.
println
(
"加密后数据:"
+
responseParam
);
// String result = send(param, "http://115.238.89.106:8888" + "/openapi", ypdPublicKey, privateKey);
// JSONObject jsonObject = JSONObject.parseObject(result);
// String sign = jsonObject.getString("sign");
// String data = jsonObject.getString("data");
// /*验签*/
// boolean f = SignUtil.veriSign(data, sign, AbcRsaUtil.getPublicKey(ypdPublicKey));
// if (f) {
// //data = "LbfVKZfHTWm0S6h81XLAgv8zRmUwljGCznpVln1be2oiuXH1vw00sPW2uA5iOJND0d+5KtCzT8O3xD4avg4qEHvwlUWDZ7nFCqs5y5X470MCSwyxrH1UbBGLNlrfiq8yWmz5eKcxlyjyhLy46IuVqpJlxZ8hP3yU2gObcACuT8YmiVgzPvzefomyF+YalaFf9l7kObTvmfayVfugC1vCvYDyIWlNs9BUeHpPboo8KUUMi7E7e/jIpunCSSd7fF7Sh3rziwa+170cZfE5wrkJ/m4cvHzK86kCzDrIOABbhuvTFIpaUs8SFNujV2E6YP6jxYJ2FR8IlgMS/W/B4fX7dQ==";
// String dec = EncryptUtil.decrypt(data, AbcRsaUtil.getPrivateKey(privateKey));
// System.out.println("解密后返回数据:" + dec);
// } else {
// System.out.println("验签异常");
// }
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
...
...
@@ -116,7 +118,7 @@ public class AbcHttpClient {
private
static
String
send
(
String
param
,
String
url
,
String
ypdPublicKey
,
String
privateKey
)
throws
Exception
{
ZyHttpBaseRquest
zyHttpBaseRquest
=
new
ZyHttpBaseRquest
();
zyHttpBaseRquest
.
setClientId
(
"yingyxh_danbao_test"
);
zyHttpBaseRquest
.
setServiceId
(
"
externalDataQuer
y"
);
zyHttpBaseRquest
.
setServiceId
(
"
loadNotif
y"
);
zyHttpBaseRquest
.
setSegNo
(
UUID
.
fastUUID
().
toString
());
zyHttpBaseRquest
.
setTransDateTime
(
DateUtil
.
now
());
...
...
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