refactor(common): 移除通用响应类

- 删除了 GenericResponse 类及其所有构造方法
- 移除了与 ResponseCode 枚举的关联逻辑
- 清理了相关的泛型数据封装结构
This commit is contained in:
海言
2026-05-28 15:33:55 +08:00
parent 548525acdd
commit 6e5a3a3142

View File

@@ -1,47 +0,0 @@
package cn.xf.basedemo.common.exception;
import lombok.Data;
/**
* @Author: xiongfeng
* @CreateTime: 2023-11-08 13:47
* @Description: TODO
* @Version: 1.0
*/
@Data
public class GenericResponse<T> {
private int code;
private T data;
private String message;
public GenericResponse() {};
public GenericResponse(int code, T data) {
this.code = code;
this.data = data;
}
public GenericResponse(int code, T data, String message) {
this(code, data);
this.message = message;
}
public GenericResponse(ResponseCode responseCode) {
this.code = responseCode.getCode();
this.data = null;
this.message = responseCode.getMessage();
}
public GenericResponse(ResponseCode responseCode, T data) {
this(responseCode);
this.data = data;
}
public GenericResponse(ResponseCode responseCode, T data, String message) {
this(responseCode, data);
this.message = message;
}
}