Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-qywx-self
Overview
Overview
Details
Activity
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
haoban3.0
gic-qywx-self
Commits
576c974e
Commit
576c974e
authored
Aug 08, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
de62639a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
QywxController.java
src/main/java/com/gic/qywx/self/QywxController.java
+25
-2
No files found.
src/main/java/com/gic/qywx/self/QywxController.java
View file @
576c974e
package
com
.
gic
.
qywx
.
self
;
import
java.io.
IOException
;
import
java.io.
*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -33,7 +33,7 @@ public class QywxController {
return
map
;
}
@RequestMapping
(
"self-post-json"
)
@RequestMapping
(
"self-post-json
-body
"
)
public
Object
selfPostJson
(
HttpServletRequest
request
,
String
url
,
@RequestBody
Map
<
String
,
Object
>
jsonBody
,
String
ip
)
{
String
json
=
null
;
if
(
null
!=
jsonBody
)
{
...
...
@@ -45,6 +45,29 @@ public class QywxController {
return
map
;
}
@RequestMapping
(
"self-post-json"
)
public
Object
selfPostJson
(
HttpServletRequest
request
,
String
url
,
String
ip
)
throws
IOException
{
InputStream
inputStream
=
request
.
getInputStream
();
InputStreamReader
inputStreamReader
=
new
InputStreamReader
(
inputStream
,
"utf-8"
);
BufferedReader
bufferedReader
=
new
BufferedReader
(
inputStreamReader
)
;
StringBuilder
buffer
=
new
StringBuilder
();
try
{
String
str
=
null
;
while
((
str
=
bufferedReader
.
readLine
())
!=
null
)
{
buffer
.
append
(
str
);
}
}
finally
{
bufferedReader
.
close
();
inputStreamReader
.
close
();
inputStream
.
close
();
}
String
json
=
buffer
.
toString
();
logger
.
info
(
"自建post json,url={},json={},{}"
,
url
,
json
,
ip
);
Map
<
String
,
Object
>
map
=
HttpClient
.
getWinxinResByJson
(
url
,
json
,
getIp
(
ip
)
,
ip
);
logger
.
info
(
"end={}"
,
JSONObject
.
toJSON
(
map
));
return
map
;
}
@RequestMapping
(
"self-get"
)
public
Object
selfGet
(
HttpServletRequest
request
,
String
url
,
String
ip
)
{
logger
.
info
(
"自建get,url={},{},{}"
,
url
,
ip
);
...
...
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