Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FrontEndProcessor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CrossProvincialPlatform
FrontEndProcessor
Commits
f3e26f73
Commit
f3e26f73
authored
May 28, 2021
by
华润
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跨省单位开户公积金服务接口
parent
833b3b27
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
50 deletions
+31
-50
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
...j/adapter/controller/ProvidentFundServicesController.java
+25
-44
src/main/java/net/cdkj/gjj/adapter/controller/TokenAcquisitionController.java
...kj/gjj/adapter/controller/TokenAcquisitionController.java
+6
-6
No files found.
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
View file @
f3e26f73
This diff is collapsed.
Click to expand it.
src/main/java/net/cdkj/gjj/adapter/controller/TokenAcquisitionController.java
View file @
f3e26f73
...
@@ -32,9 +32,9 @@ public class TokenAcquisitionController {
...
@@ -32,9 +32,9 @@ public class TokenAcquisitionController {
jsonObject
.
put
(
"grant_type"
,
"ip"
);
jsonObject
.
put
(
"grant_type"
,
"ip"
);
jsonObject
.
put
(
"userid"
,
"gjj"
);
jsonObject
.
put
(
"userid"
,
"gjj"
);
String
str
=
jsonObject
.
toString
();
String
str
=
jsonObject
.
toString
();
System
.
out
.
println
(
"zip压缩处理之前要发送给第三方的报文:"
+
str
);
System
.
out
.
println
(
"
鉴权参数
zip压缩处理之前要发送给第三方的报文:"
+
str
);
String
s
=
zipString
(
str
);
//进行zip压缩
//
String s = zipString(str);//进行zip压缩
System
.
out
.
println
(
"zip压缩处理之后发送给第三方的报文:"
+
s
);
// System.out.println("鉴权参数zip压缩处理之后发送给第三方的报文:" + str
);
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
HttpURLConnection
conn
=
null
;
HttpURLConnection
conn
=
null
;
OutputStream
out
=
null
;
OutputStream
out
=
null
;
...
@@ -59,7 +59,7 @@ public class TokenAcquisitionController {
...
@@ -59,7 +59,7 @@ public class TokenAcquisitionController {
// 设置文件字符集:
// 设置文件字符集:
conn
.
setRequestProperty
(
"Charset"
,
"UTF-8"
);
conn
.
setRequestProperty
(
"Charset"
,
"UTF-8"
);
// 转换为字节数组
// 转换为字节数组
byte
[]
data
=
(
s
).
getBytes
(
"UTF-8"
);
byte
[]
data
=
(
s
tr
).
getBytes
(
"UTF-8"
);
// 设置文件长度
// 设置文件长度
conn
.
setRequestProperty
(
"Content-Length"
,
String
.
valueOf
(
data
.
length
));
conn
.
setRequestProperty
(
"Content-Length"
,
String
.
valueOf
(
data
.
length
));
// 开始连接请求
// 开始连接请求
...
@@ -77,9 +77,9 @@ public class TokenAcquisitionController {
...
@@ -77,9 +77,9 @@ public class TokenAcquisitionController {
sb
.
append
(
readLine
);
sb
.
append
(
readLine
);
}
}
responseReader
.
close
();
responseReader
.
close
();
System
.
out
.
println
(
"第三方返回的zip压缩过的报文:"
+
sb
.
toString
());
System
.
out
.
println
(
"
鉴权参数
第三方返回的zip压缩过的报文:"
+
sb
.
toString
());
String
s1
=
unzipString
(
sb
.
toString
());
//将第三方返回的压缩过的json字符串解压缩
String
s1
=
unzipString
(
sb
.
toString
());
//将第三方返回的压缩过的json字符串解压缩
System
.
out
.
println
(
"第三方返回的zip解压缩之后的报文:"
+
s1
);
System
.
out
.
println
(
"
鉴权参数
第三方返回的zip解压缩之后的报文:"
+
s1
);
return
s1
;
return
s1
;
}
else
{
}
else
{
System
.
out
.
println
(
"请求失败!!!"
);
System
.
out
.
println
(
"请求失败!!!"
);
...
...
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