类 CodeResult<T>
java.lang.Object
cloud.opencode.base.basecode.CodeResult<T>
- 所有已实现的接口:
Serializable
- 作者:
- Jon url: Jon's blog url: OpenCode.cloud
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明CodeResult(org.springframework.http.HttpStatus status) CodeResult(org.springframework.http.HttpStatus status, T body) CodeResult(org.springframework.http.HttpStatus status, T body, Long total, Long page, Long pageSize, String message, Integer code, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) CodeResult(org.springframework.http.HttpStatus status, T body, String message, Integer code) CodeResult(org.springframework.http.HttpStatus status, T body, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) -
方法概要
修饰符和类型方法说明static CodeResultERROR()ERRORstatic CodeResultERRORstatic CodeResultERRORstatic CodeResultERRORstatic CodeResultERROR(org.springframework.http.HttpStatus status, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) ERRORstatic CodeResultOK()OKstatic <T> CodeResultOK(T data) OKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOK(T data, Long total, Long page, Long pageSize, String message, Integer code, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) OKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOK(T data, org.springframework.http.HttpStatus status) OKstatic <T> CodeResultOK(T data, org.springframework.http.MediaType type) OKstatic <T> CodeResultOK(T data, org.springframework.http.MediaType type, org.springframework.http.HttpStatus status) OKstatic <T> CodeResultOK(T data, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) OKstatic <T> CodeResultOK(T data, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatus status) OKstatic <T> CodeResultOKOnlyStatus(org.springframework.http.HttpStatus status) OKstatic <T> CodeResultOKWithMediaTypeAndHeaders(T data, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers) OKWithMediaTypeAndHeadersstatic <T> CodeResultOKWithMediaTypeAndHeaders(T data, org.springframework.http.MediaType type, org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatus status) OKWithMediaTypeAndHeadersstatic <T> CodeResultOKWithoutStatus(T data) OK
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
data
-
code
-
message
-
status
private org.springframework.http.HttpStatus status -
total
-
page
-
pageSize
-
headers
@Nullable private org.springframework.http.HttpHeaders headers -
timestamp
private long timestamp -
mediaType
@Nullable private org.springframework.http.MediaType mediaType
-
-
构造器详细资料
-
CodeResult
public CodeResult(@Nullable org.springframework.http.HttpStatus status) -
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
public CodeResult(@Nullable org.springframework.http.HttpStatus status, @Nullable T body, @Nullable Long total, @Nullable Long page, @Nullable Long pageSize, @Nullable String message, @Nullable Integer code, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers)
-
-
方法详细资料
-
OK
OK- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data-- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datastatus- HttpStatus- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datamessage- message- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datamessage- messagestatus- HttpStatus- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datamessage- messagecode- code- 返回:
-
OK
public static <T> CodeResult OK(T data, String message, Integer code, org.springframework.http.HttpStatus status) OK- 类型参数:
T-- 参数:
data- datamessage- messagecode- codestatus- HttpStatus- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datatype- MediaType- 返回:
-
OK
public static <T> CodeResult OK(T data, org.springframework.http.MediaType type, org.springframework.http.HttpStatus status) OK- 类型参数:
T-- 参数:
data- datatype- MediaTypestatus- HttpStatus- 返回:
-
OK
public static <T> CodeResult OK(T data, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers) OK- 类型参数:
T-- 参数:
data- datatype- typeheaders- HttpHeaders- 返回:
-
OK
public static <T> CodeResult OK(T data, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatus status) OK- 类型参数:
T-- 参数:
data- datatype- typeheaders- HttpHeadersstatus- HttpStatus- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data- datatotal- totalpage- pagepageSize- pageSize- 返回:
-
OK
public static <T> CodeResult OK(T data, Long total, Long page, Long pageSize, String message, Integer code) OK- 类型参数:
T-- 参数:
data- datatotal- totalpage- pagepageSize- pageSizemessage- messagecode- code- 返回:
-
OK
public static <T> CodeResult OK(T data, Long total, Long page, Long pageSize, String message, Integer code, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers) OK- 类型参数:
T-- 参数:
data- DATAtotal- totalpage- pagepageSize- pageSizemessage- messagecode- codetype- MediaTypeheaders- HttpHeaders- 返回:
-
OKWithMediaTypeAndHeaders
public static <T> CodeResult OKWithMediaTypeAndHeaders(T data, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatus status) OKWithMediaTypeAndHeaders- 类型参数:
T-- 参数:
data- datatype- MediaTypeheaders- HttpHeadersstatus- HttpStatus- 返回:
-
OKWithMediaTypeAndHeaders
public static <T> CodeResult OKWithMediaTypeAndHeaders(T data, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers) OKWithMediaTypeAndHeaders- 类型参数:
T-- 参数:
data- datatype- MediaTypeheaders- HttpHeaders- 返回:
-
OKOnlyStatus
OK- 类型参数:
T-- 参数:
status- HttpStatus- 返回:
-
OKWithoutStatus
OK- 类型参数:
T-- 参数:
data-- 返回:
-
ERROR
ERROR- 返回:
-
ERROR
ERROR- 参数:
message- message- 返回:
-
ERROR
ERROR- 参数:
status- HttpStatusmessage- message- 返回:
-
ERROR
public static CodeResult ERROR(org.springframework.http.HttpStatus status, String message, Integer code) ERROR- 参数:
status- HttpStatusmessage- messagecode- code- 返回:
-
ERROR
public static CodeResult ERROR(org.springframework.http.HttpStatus status, @Nullable org.springframework.http.MediaType type, @Nullable org.springframework.util.MultiValueMap<String, String> headers) ERROR- 参数:
status- HttpStatustype- MediaTypeheaders- HttpHeaders- 返回:
-