Commit Graph
4 Commits
Author SHA1 Message Date
lizhilunandClaude Opus 4.6 d551841035 refactor: 系统优化 - 错误处理、输入验证、无限滚动
主要改进:
- 新增配置管理 (server/config.js)
- 新增日志工具 (server/utils/logger.js)
- 添加全局错误处理中间件,统一错误响应格式
- 添加输入验证和 AppError 错误类
- 重构 db.js 迁移逻辑,代码更清晰
- 前端列表改为无限滚动加载,每页 20 条
- 封装 AppState 状态管理模块

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 10:39:58 +08:00
lizhilunandClaude Opus 4.6 df3a9daa65 perf: 系统性能优化 - 数据库索引、缓存、GZIP压缩和查询合并
- 添加3个复合索引提升查询性能 (user_date, user_category, destination)
- 添加GZIP压缩和静态资源缓存 (maxAge: 1h)
- 添加API响应no-cache头
- 添加stats端点2分钟内存缓存 (per-user key, LRU淘汰)
- 合并多次数据库查询为单次查询
- 添加滚动防抖改善移动端体验
- 修复res.once内存泄漏问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 10:25:37 +08:00
lizhilunandClaude Opus 4.6 0b450a65ed perf: 优化数据库查询和前端代码质量
- 添加 records 表常用字段索引提升查询性能
- 合并月度/老板/陪玩记录查询减少数据库往返
- 提取重复的横向柱状图渲染逻辑为通用函数
- 移除调试用的 console.log 语句

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:22:15 +08:00
lizhilunandClaude Opus 4.6 a0d7bfdc3d Initial commit: gamer project
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:23:10 +08:00