Commit 8aacfbe8 by 张祺

给统一结果对象加注释说明

parent eba126aa
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment