fawney19
a12b43ce5c
refactor: 清理数据库字段命名歧义
...
- users 表:重命名 allowed_endpoints 为 allowed_api_formats(修正历史命名错误)
- api_keys 表:删除 allowed_endpoints 字段(未使用的功能)
- providers 表:删除 rate_limit 字段(与 rpm_limit 重复)
- usage 表:重命名 provider 为 provider_name(避免与 provider_id 外键混淆)
同步更新前后端所有相关代码
2026-01-07 19:53:32 +08:00
fawney19
4e1aed9976
feat: add daily model statistics aggregation with stats_daily_model table
2025-12-20 02:39:10 +08:00
fawney19
1dac4cb156
refactor: optimize provider query and stats aggregation logic
2025-12-17 16:41:10 +08:00
fawney19
2f9d943647
fix(system): fix timezone handling in dashboard and stats services
...
- Use app timezone instead of UTC for date calculations in dashboard routes
- Ensure consistency between stats_daily.date and timezone-aware comparisons
- Fix date calculations in cleanup scheduler to handle DST correctly
- Update log message in stats aggregator to use business date
2025-12-14 00:16:03 +08:00
fawney19
39defce71c
fix: 修复统计聚合的时区问题,启动时自动回填缺失数据
...
- 统计聚合使用业务时区(APP_TIMEZONE)计算日期,而非UTC
- 新增 _get_business_day_range() 将业务日期转换为UTC时间范围
- 启动时检查并自动回填因容器重启等原因缺失的统计数据
- 修复 aggregate_daily_stats/update_summary/get_today_realtime_stats 等方法的时区计算
2025-12-12 10:06:07 +08:00
fawney19
f784106826
Initial commit
2025-12-10 20:52:44 +08:00