public class ResultUtils extends Object
| 构造器和说明 |
|---|
ResultUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BaseResponse |
error(ErrorCode errorCode)
失败
|
static BaseResponse |
error(ErrorCode errorCode,
String message)
失败
|
static BaseResponse |
error(int code,
String message)
失败
|
static <T> BaseResponse<T> |
success(T data)
成功
|
public static <T> BaseResponse<T> success(T data)
T - data - public static BaseResponse error(ErrorCode errorCode)
errorCode - public static BaseResponse error(int code, String message)
code - message - public static BaseResponse error(ErrorCode errorCode, String message)
errorCode - Copyright © 2024. All rights reserved.