mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 21:09:19 +08:00
refactor(api): 统一后端接口响应消息,改为具体操作描述而非泛化'操作成功'
This commit is contained in:
+4
@@ -24,6 +24,10 @@ public class ApiResponse<T> {
|
||||
return new ApiResponse<>(0, "操作成功", null);
|
||||
}
|
||||
|
||||
public static ApiResponse<Void> success(String message) {
|
||||
return new ApiResponse<>(0, message, null);
|
||||
}
|
||||
|
||||
public static <T> ApiResponse<T> fail(String message) {
|
||||
return new ApiResponse<>(1, message, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user