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 b90af27c
authored
Mar 30, 2021
by
周海宝
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev' into 'master'
[+]代码修改 See merge request
!11
2 parents
d3a4e340
4f62b02e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
src/main/java/cn/com/glsx/modules/service/DeviceService.java
src/main/java/cn/com/glsx/modules/service/UserService.java
src/main/java/cn/com/glsx/modules/service/DeviceService.java
View file @
b90af27
...
@@ -46,7 +46,8 @@ public class DeviceService {
...
@@ -46,7 +46,8 @@ public class DeviceService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -56,7 +57,8 @@ public class DeviceService {
...
@@ -56,7 +57,8 @@ public class DeviceService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -66,7 +68,8 @@ public class DeviceService {
...
@@ -66,7 +68,8 @@ public class DeviceService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -76,7 +79,8 @@ public class DeviceService {
...
@@ -76,7 +79,8 @@ public class DeviceService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -96,7 +100,8 @@ public class DeviceService {
...
@@ -96,7 +100,8 @@ public class DeviceService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -105,7 +110,8 @@ public class DeviceService {
...
@@ -105,7 +110,8 @@ public class DeviceService {
if
(
responseBody
!=
null
&&
responseBody
.
isSuccess
())
{
if
(
responseBody
!=
null
&&
responseBody
.
isSuccess
())
{
return
R
.
ok
();
return
R
.
ok
();
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMsg
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
}
}
src/main/java/cn/com/glsx/modules/service/UserService.java
View file @
b90af27
package
cn
.
com
.
glsx
.
modules
.
service
;
package
cn
.
com
.
glsx
.
modules
.
service
;
import
cn.com.glsx.common.DeviceErrorEnum
;
import
cn.com.glsx.modules.model.param.ResponseBody
;
import
cn.com.glsx.modules.model.param.ResponseBody
;
import
cn.com.glsx.modules.model.param.UserBo
;
import
cn.com.glsx.modules.model.param.UserBo
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -42,7 +43,8 @@ public class UserService {
...
@@ -42,7 +43,8 @@ public class UserService {
String
result
=
responseBody
.
getResult
();
String
result
=
responseBody
.
getResult
();
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMessage
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -57,7 +59,8 @@ public class UserService {
...
@@ -57,7 +59,8 @@ public class UserService {
String
result
=
responseBody
.
getResult
()
+
""
;
String
result
=
responseBody
.
getResult
()
+
""
;
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMessage
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
@@ -71,7 +74,8 @@ public class UserService {
...
@@ -71,7 +74,8 @@ public class UserService {
String
result
=
responseBody
.
getResult
()
+
""
;
String
result
=
responseBody
.
getResult
()
+
""
;
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
responseBody
.
getMessage
();
Integer
code
=
responseBody
==
null
?
500
:
responseBody
.
getCode
();
String
errorMessage
=
responseBody
==
null
?
"调用涂鸦失败"
:
DeviceErrorEnum
.
searchValue
(
code
+
""
);
return
R
.
error
(
errorMessage
);
return
R
.
error
(
errorMessage
);
}
}
...
...
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