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);
    }
}
最近下载更多
唐僧洗头爱飘柔  LV22 7月10日
ewan007  LV30 7月2日
欠踹de背影  LV25 6月30日
最代码官方  LV168 6月29日
最近浏览更多
lipanlong  LV10 前天
Rucoding  LV8 8月15日
冰枫xjz8  LV31 8月11日
一个小兵  LV1 8月2日
gzxsvip  LV27 7月30日
260858883  LV5 7月25日
yimaoermao  LV1 7月25日
Mirage无衣 7月25日
暂无贡献等级
wonderfulvv  LV4 7月24日
hulewang  LV8 7月23日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友