refactor(core):重构基础参数类并移除冗余代码

- 移除 BaseParam 中对 CommonUtil 的依赖,直接实现 getOne 方法- 删除多个已废弃或未使用的工具类和控制器文件
- 清理无用的常量类定义
- 移除重复的业务异常和缓存实体类定义
- 优化 BaseController 中的租户 ID 获取逻辑
- 删除阿里云发送工具类及相关支付配置工具类
- 清理 WebSocket 相关 AI 控制器代码
This commit is contained in:
2025-10-16 19:53:00 +08:00
parent cf419f0ddc
commit 28dce07428
4 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
package com.gxwebsoft.common.core.web;
import org.springframework.web.bind.annotation.RestController;
/**
* 简化版控制器基类,用于代码生成
* Created by WebSoft on 2019-10-29 15:55
*/
@RestController
public class SimpleBaseController {
/**
* 响应成功结果
*
* @param data 数据内容
* @param <T> 数据类型
* @return 响应结果
*/
protected <T> ApiResult<T> success(T data) {
return new ApiResult<T>(0, "操作成功", data);
}
/**
* 响应成功结果
*
* @return 响应结果
*/
protected ApiResult<String> success(String message) {
return new ApiResult<String>(0, message, null);
}
/**
* 响应失败结果
*
* @param message 错误信息
* @return 响应结果
*/
protected ApiResult<String> fail(String message) {
return new ApiResult<String>(1, message, null);
}
/**
* 响应失败结果
*
* @param code 错误码
* @param message 错误信息
* @return 响应结果
*/
protected ApiResult<String> fail(int code, String message) {
return new ApiResult<String>(code, message, null);
}
}