Commit Graph
8 Commits
Author SHA1 Message Date
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 3a4048a29e fix: 修复 partner-records 缺少 source 参数
CASE 表达式中的 source=? 需要单独的 partner 参数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:37:23 +08:00
lizhilunandClaude Opus 4.6 f381f93507 fix: 修复 partner-records SQL 参数顺序错误
参数顺序从 user_id, partner, partner 改为 partner, user_id, partner
以匹配 SQL 中 source, user_id, partner, source 的占位符顺序

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:35:19 +08:00
lizhilunandClaude Opus 4.6 d473e3a431 fix: 修复重构引入的 bug
- partner-records: 修复 SQL 参数顺序错误
- partner-records: 移除对已删除变量的引用
- stats.js: 修复 toFixed 在数字原型上调用的问题
- stats.js: 简化 onclick 处理避免转义问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:27:39 +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 14927f74aa fix: 修复柱状图高度比例计算并添加月度筛选功能
- 修复最近7天收入柱状图高度使用百分比导致比例失真问题,改为像素计算
- 老板/陪玩交易详情页添加"全部/当月"切换按钮
- 老板/陪玩交易详情页添加月度导航切换功能
- 老板/陪玩交易详情页添加自动加载更多数据功能

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:13:02 +08:00
lizhilunandClaude Opus 4.6 2ebac98f07 refactor: 重构代码减少重复并添加分页
后端 (records.js):
- 提取通用分页查询函数 queryPagedRecords
- 5个列表接口 (orders/other-income/red-envelope/milk-tea/dispatches) 复用同一函数

后端 (stats.js):
- 为 monthly-records, boss-records, partner-records, daily-detail 添加分页支持
- 新增 page, limit, totalCount 返回字段

前端 (order-list.js):
- 提取通用列表配置 listConfig
- 统一渲染函数 renderOrderItem/renderOtherIncomeItem 等
- 大幅减少代码重复

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 09:53:48 +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