public class ResultVO<B> extends ResultCommon
| 构造器和说明 |
|---|
ResultVO() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <B> ResultVO<B> |
fail()
失败返回
|
static <B> ResultVO<B> |
fail(B body)
失败返回
|
static <B> ResultVO<B> |
fail(String message,
B body)
失败返回
|
static <B> ResultVO<B> |
failMessage(String message)
失败返回
|
B |
getCheckedData()
判断是否有异常。
|
B |
getData() |
static <B> ResultVO<B> |
of(B body,
ExceptionCode resultCode)
静态的公共方法
|
static <B> ResultVO<B> |
of(B body,
int code,
String message)
静态的公共方法
|
static <B> ResultVO<B> |
of(ExceptionCode resultCode)
静态的公共方法
|
static <B> ResultVO<B> |
of(int code,
String message)
静态的公共方法
|
static ResultVO<String> |
resultMsg(boolean result,
String message)
ResultVO resultMsg
|
void |
setData(B data) |
static <B> ResultVO<B> |
success()
成功默认返回
|
static <B> ResultVO<B> |
success(B body)
成功返回
|
static <B> ResultVO<B> |
success(String message,
B body)
成功返回
|
static <B> ResultVO<B> |
successMessage(String message)
成功返回
|
String |
toString() |
checkError, getCode, getMessage, getTraceId, getTs, isSuccess, setCode, setMessage, setTraceIdpublic static <B> ResultVO<B> of(ExceptionCode resultCode)
public static <B> ResultVO<B> of(B body, ExceptionCode resultCode)
public static <B> ResultVO<B> of(int code, String message)
public static <B> ResultVO<B> of(B body, int code, String message)
public static <B> ResultVO<B> success()
public static <B> ResultVO<B> success(B body)
public static <B> ResultVO<B> successMessage(String message)
public static <B> ResultVO<B> success(String message, B body)
public static <B> ResultVO<B> fail()
public static <B> ResultVO<B> fail(B body)
public static <B> ResultVO<B> fail(String message, B body)
public B getCheckedData()
ServiceException 异常
如果没有,则返回 data 数据
JsonIgnore避免 jackson 序列化public static ResultVO<String> resultMsg(boolean result, String message)
public B getData()
public void setData(B data)
public String toString()
toString 在类中 ResultCommonCopyright © 2024 tan. All rights reserved.