You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RuoYi-Vue/openspec/changes/archive/2026-06-28-refactor-backend.../tasks.md

1001 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Tasks: 后端 API 规范化

1. 基础框架优化

  • 1.1 统一响应格式类ApiResponse
  • 1.2 统一异常处理GlobalExceptionHandler
  • 1.3 错误码枚举定义
  • 1.4 API 版本管理

2. Controller 层重构

  • 2.1 重构系统管理 Controller
  • 2.2 重构 book-system Controller
  • 2.3 统一参数校验
  • 2.4 优化接口命名和路径

3. Service 层优化

  • 3.1 重构系统管理 Service
  • 3.2 重构 book-system Service
  • 3.3 添加事务管理
  • 3.4 添加 Redis 缓存

4. API 文档

  • 4.1 配置 Swagger/OpenAPI
  • 4.2 添加 API 注释
  • 4.3 生成完整 API 文档
  • 4.4 添加在线测试功能

5. 性能优化

  • 5.1 优化慢查询
  • 5.2 添加接口性能监控
  • 5.3 批量操作优化
  • 5.4 缓存策略优化

验收标准

  • 所有 API 响应格式统一
  • API 文档完整可访问
  • 接口 P95 响应时间 < 200ms
  • 前端调用无兼容性问题