package com.rgzn.app.common;

public class ApiResponseUtil {
    // 成功响应
    public static <T> ApiResponse<T> success(T data) {
        return new ApiResponse<>(200, "Success", data);
    }

    // 成功响应,无数据
    public static <T> ApiResponse<T> success() {
        return new ApiResponse<>(200, "Success", null);
    }

    // 错误响应
    public static <T> ApiResponse<T> error(int code, String message) {
        return new ApiResponse<>(code, message, null);
    }
}
最近下载更多
半夏bx  LV15 9月8日
唐僧洗头爱飘柔  LV22 7月10日
ewan007  LV30 7月2日
欠踹de背影  LV25 6月30日
最代码官方  LV168 6月29日
最近浏览更多
wyx065747  LV67 10月1日
Molly123  LV8 9月27日
arrce11 9月26日
暂无贡献等级
xxyylu  LV2 9月22日
xiaotao555555  LV3 9月21日
zhos0212  LV19 9月19日
Dominick  LV14 9月16日
梁小贤  LV1 9月12日
半夏bx  LV15 9月8日
kinggode  LV14 9月5日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友