Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
smartDevices-platform-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b4cadbb1
authored
Apr 19, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]红外设备代码提交
1 parent
9737b110
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
src/main/java/cn/com/glsx/modules/model/param/ResponseBody.java
src/main/java/cn/com/glsx/modules/service/SendRequestService.java
src/main/java/cn/com/glsx/modules/model/param/ResponseBody.java
View file @
b4cadbb
...
...
@@ -28,4 +28,15 @@ public class ResponseBody {
private
String
message
;
private
String
msg
;
@Override
public
String
toString
()
{
return
"ResponseBody{"
+
"success="
+
success
+
", result='"
+
result
+
'\''
+
", code="
+
code
+
", message='"
+
message
+
'\''
+
", msg='"
+
msg
+
'\''
+
'}'
;
}
}
src/main/java/cn/com/glsx/modules/service/SendRequestService.java
View file @
b4cadbb
...
...
@@ -75,6 +75,7 @@ public class SendRequestService {
try
{
JSONObject
jsonObject
=
HttpUtil
.
sendGet
(
requesturl
,
null
,
headerParams
);
responseBody
=
JSON
.
toJavaObject
(
jsonObject
,
ResponseBody
.
class
);
log
.
info
(
"请求涂鸦数据{}"
,
responseBody
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
log
.
info
(
"请求用户信息接口异常,异常信息{}"
,
e
.
getMessage
());
...
...
@@ -99,6 +100,7 @@ public class SendRequestService {
try
{
JSONObject
jsonObject
=
HttpUtil
.
sendPut
(
requesturl
,
requestBody
,
headerParams
);
responseBody
=
JSON
.
toJavaObject
(
jsonObject
,
ResponseBody
.
class
);
log
.
info
(
"请求涂鸦数据{}"
,
responseBody
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
log
.
info
(
"请求用户信息接口异常,异常信息{}"
,
e
.
getMessage
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment