public class ResultBody<T> extends BaseModel
Description:
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
CODE_ACCESS |
static int |
CODE_AUTHORIZATION |
static int |
CODE_ERROR |
static int |
CODE_ILLEGAL |
static int |
CODE_NOT_FOUND |
static int |
CODE_SUCCESS |
| 构造器和说明 |
|---|
ResultBody()
constructor use
ResultBody(int, String, long, Object) |
| 限定符和类型 | 方法和说明 |
|---|---|
static ResultBody |
error() |
static ResultBody |
error(int code,
String message) |
static ResultBody |
error(String message) |
T |
getBody() |
int |
getCode() |
String |
getMessage() |
Long |
getTimestamp() |
void |
setBody(T body) |
void |
setCode(int code) |
void |
setMessage(String message) |
void |
setTimestamp(Long timestamp) |
static <T> ResultBody<T> |
success() |
static <T> ResultBody<T> |
success(T data) |
toJsonStringpublic static final int CODE_SUCCESS
public static final int CODE_ERROR
public static final int CODE_NOT_FOUND
public static final int CODE_ILLEGAL
public static final int CODE_ACCESS
public static final int CODE_AUTHORIZATION
public ResultBody()
ResultBody(int, String, long, Object)public int getCode()
public void setCode(int code)
public String getMessage()
public void setMessage(String message)
public Long getTimestamp()
public void setTimestamp(Long timestamp)
public T getBody()
public void setBody(T body)
public static <T> ResultBody<T> success()
public static <T> ResultBody<T> success(T data)
public static ResultBody error(int code, String message)
public static ResultBody error(String message)
public static ResultBody error()
Copyright © 2021. All rights reserved.