Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
3964a800
Commit
3964a800
authored
Mar 24, 2021
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改返回格式
parent
01f6cb32
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
RESULT_INFO_ENUM.java
...energy/chnmuseum/party/common/enums/RESULT_INFO_ENUM.java
+3
-3
BaseController.java
...y/chnmuseum/party/web/controller/base/BaseController.java
+2
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/RESULT_INFO_ENUM.java
View file @
3964a800
...
...
@@ -8,9 +8,9 @@ package cn.wisenergy.chnmuseum.party.common.enums;
*/
public
enum
RESULT_INFO_ENUM
{
RESULT_CODE
(
"
c
ode"
,
"响应码key"
),
RESULT_MSG
(
"m
sg
"
,
"响应信息key"
),
RESULT_BODY
(
"
body
"
,
"响应传输信息key"
);
RESULT_CODE
(
"
resultC
ode"
,
"响应码key"
),
RESULT_MSG
(
"m
essage
"
,
"响应信息key"
),
RESULT_BODY
(
"
data
"
,
"响应传输信息key"
);
/**
* 响应结果key
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/base/BaseController.java
View file @
3964a800
...
...
@@ -58,6 +58,7 @@ public class BaseController implements Serializable {
protected
Map
<
String
,
Object
>
getResult
(
Object
obj
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_CODE
.
getKey
(),
RESPONSE_CODE_ENUM
.
REQUEST_SUCCESS
.
getCode
());
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_MSG
.
getKey
(),
RESPONSE_CODE_ENUM
.
REQUEST_SUCCESS
.
getMsg
());
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_BODY
.
getKey
(),
obj
);
return
map
;
}
...
...
@@ -71,6 +72,7 @@ public class BaseController implements Serializable {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_CODE
.
getKey
(),
RESPONSE_CODE_ENUM
.
REQUEST_SUCCESS
.
getCode
());
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_MSG
.
getKey
(),
RESPONSE_CODE_ENUM
.
REQUEST_SUCCESS
.
getMsg
());
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_BODY
.
getKey
(),
""
);
return
map
;
}
...
...
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