public class Resp<T> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ERROR |
static int |
NOT_DATA |
static int |
NOT_FOUND |
static int |
NOT_LOGIN |
static int |
NOT_PERM |
static int |
OK |
static int |
SERVER_ERROR |
| 构造器和说明 |
|---|
Resp() |
Resp(int code) |
Resp(int code,
String msg) |
Resp(int code,
String msg,
T data) |
| 限定符和类型 | 方法和说明 |
|---|---|
Resp<T> |
code(int code) |
Resp<T> |
data(T data) |
Resp<T> |
error(String msg) |
static <T> Resp<T> |
ERROR(String msg) |
Resp<T> |
error(String msg,
T data) |
static <T> Resp<T> |
ERROR(String msg,
T data) |
static <T> Resp<T> |
FAIL()
操作失败
|
static <T> Resp<T> |
FAIL(String msg) |
int |
getCode() |
T |
getData() |
String |
getMsg() |
static <T> Resp<List<T>> |
LIST_O(List<T> list) |
static <T> Resp<NutzPages<List<T>>> |
LIST_PAGE(List<T> list,
org.nutz.dao.pager.Pager pager) |
static <T> Resp<List<T>> |
LIST_Q(List<T> list) |
static <T> Resp<List<T>> |
LIST(List<T> list,
String okMsg,
String errorMsg) |
Resp<T> |
msg(String msg) |
static <T> Resp<T> |
NEW() |
static <T> Resp<T> |
NEW(Class<T> cls) |
static <T> Resp<T> |
NEW(int code) |
static <T> Resp<T> |
NEW(int code,
String msg) |
static <T> Resp<T> |
NEW(int code,
String msg,
T obj) |
static <T> Resp<T> |
NO_DATA(String msg) |
static <T> Resp<T> |
NO_DATA(String msg,
T data) |
static <T> Resp<T> |
OBJ_O(T obj) |
static <T> Resp<T> |
OBJ_Q(T obj) |
Resp<T> |
ok(String msg) |
static <T> Resp<T> |
OK(String msg) |
Resp<T> |
ok(String msg,
T data) |
static <T> Resp<T> |
OK(String msg,
T data) |
void |
setCode(int code) |
void |
setData(T data) |
void |
setMsg(String msg) |
static <T> Resp<T> |
SUCCESS()
操作成功
|
static <T> Resp<T> |
SUCCESS(String msg) |
public static int OK
public static int NOT_LOGIN
public static int ERROR
public static int NOT_PERM
public static int NOT_FOUND
public static int NOT_DATA
public static int SERVER_ERROR
public Resp()
public Resp(int code)
public Resp(int code,
String msg)
public static <T> Resp<T> NEW()
public static <T> Resp<T> NEW(int code)
public int getCode()
public void setCode(int code)
public String getMsg()
public void setMsg(String msg)
public T getData()
public void setData(T data)
public static <T> Resp<T> SUCCESS()
public static <T> Resp<T> FAIL()
public static <T> Resp<NutzPages<List<T>>> LIST_PAGE(List<T> list, org.nutz.dao.pager.Pager pager)
public static <T> Resp<T> OBJ_O(T obj)
public static <T> Resp<T> OBJ_Q(T obj)
Copyright © 癸卯【兔】年–2023 hlinfo. All rights reserved.