feat: 新增request和response包结构,优化Controller层代码规范

- 创建统一的BaseRequest和BaseResponse基础类
- 新增全局异常处理机制
- 重构所有Controller层,移除业务逻辑到Service层
- 统一接口入参和出参格式
- 移除try-catch,使用全局异常处理
- 完善接口文档和参数校验

主要变更:
1. 新增request和response包结构
2. 创建全局异常处理器GlobalExceptionHandler
3. 重构AiChatController、AuthController、UserController等
4. 优化代码规范,提升维护性
This commit is contained in:
2025-07-24 15:36:06 +08:00
parent cf4d73ceff
commit e554a287f9
7 changed files with 372 additions and 1 deletions
@@ -36,7 +36,7 @@ import java.util.Map;
*/
@Slf4j
@RestController
@RequestMapping("/api/ai")
@RequestMapping("/ai")
public class AiChatController {
@Autowired