录音管理功能联调

This commit is contained in:
spllzh
2025-10-25 23:07:07 +08:00
parent 6801f06db5
commit c14476dc92
34 changed files with 1254 additions and 58 deletions

View File

@@ -4,7 +4,7 @@ package com.rj.common;
/**
* 返回值的标准格式
*/
public class Result {
public class Result<T> {
/**
* 状态码
*/
@@ -22,29 +22,29 @@ public class Result {
/**
* 成功 不返回数据
*/
public static Result ok(){
return new Result();
public static <T> Result<T> ok(){
return new Result<T>();
}
/**
* 失败返回自定义消息
*/
public static Result error(String msg){
return new Result(-1,msg);
public static <T> Result<T> error(String msg){
return new Result<T>(-1,msg);
}
/**
* 失败返回系统异常消息
*/
public static Result error(){
return new Result(-1,"系统异常");
public static <T> Result<T> error(){
return new Result<T>(-1,"系统异常");
}
/**
* 成功返回数据
*/
public static Result ok(Object data){
return new Result(data);
public static <T> Result<T> ok(Object data){
return new Result<T>(data);
}
public Result(int code, String msg) {