T - 包装类型@Doc(value="API\u63a5\u53e3\u5c01\u88c5\u5305LIST") public class ApiListResult<T> extends Object implements Serializable
| 构造器和说明 |
|---|
ApiListResult() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ApiListResult |
create()
创建空的返回结果集,使用者需要填写 code message data 三个字段值
|
static <T> ApiListResult |
error(String message)
返回代码Code 为500的代码返回结果
|
static <T> ApiListResult<T> |
result(IBizCode resultCode,
T dataParameter,
String parameters)
根据ErrorCode 创建返回结果集
|
static <T> ApiListResult<T> |
result(Integer code,
String message,
T dataParameter) |
static <T> ApiListResult |
success(T data)
返回代码Code 为200的代码返回结果
|
public static <T> ApiListResult<T> result(IBizCode resultCode, T dataParameter, String parameters)
T - 返回的数据实体类型resultCode - 返回码枚举接口dataParameter - 可以为 nullparameters - 返回消息需要格式化的参数public static <T> ApiListResult<T> result(Integer code, String message, T dataParameter)
T - datacode - codemessage - messagedataParameter - datapublic static ApiListResult create()
public static <T> ApiListResult success(T data)
T - return typedata - datapublic static <T> ApiListResult error(String message)
T - data typemessage - messageCopyright © 2021. All rights reserved.