Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
zhangkb
indicators
Commits
8aacfbe8
Commit
8aacfbe8
authored
Jul 21, 2020
by
张祺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
给统一结果对象加注释说明
parent
eba126aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Result.java
src/main/java/com/keymobile/indicators/result/Result.java
+7
-0
No files found.
src/main/java/com/keymobile/indicators/result/Result.java
View file @
8aacfbe8
package
com
.
keymobile
.
indicators
.
result
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
/**
...
...
@@ -7,6 +10,7 @@ import java.io.Serializable;
* @param <T>
*/
@SuppressWarnings
(
"rawtypes"
)
@ApiModel
(
"通用返回结果对象"
)
public
class
Result
<
T
>
implements
Serializable
{
private
static
final
String
DEFAULT_UNAUTHORIZED_MESSAGE
=
"Need authorized"
;
...
...
@@ -16,16 +20,19 @@ public class Result<T> implements Serializable {
/**
* 结果编码
*/
@ApiModelProperty
(
"结果编码,一般小于0表示错误"
)
private
int
code
;
/**
* 结果消息内容
*/
@ApiModelProperty
(
"消息内容,一般错误的时候回返回错误提示"
)
private
String
msg
;
/**
* 结果数据对象
*/
@ApiModelProperty
(
"结果的数据对象"
)
private
T
data
;
public
Result
(
T
data
)
{
...
...
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