package xiaozhi.common.utils; /** * 返回响应体工具类 */ public class ResultUtils { public static Result success(T data) { return new Result().ok(data); } public static Result error() { return new Result().error(); } public static Result error(String msg) { return new Result().error(msg); } public static Result error(int errorCode, String msg) { return new Result().error(errorCode, msg); } public static Result error(int errorCode) { return new Result().error(errorCode); } public static Result empty() { return new Result(); } }