Files
gaokao-volunteer-system/admin/tests
Hermes Agent ca80d7ba0e
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(stats): add pending_orders to dashboard summary
- admin/stats.py compute_summary 在单条聚合 SQL 中加 pending_orders 字段
  (status = 'pending' 计数),与 total_orders / total_revenue_cents 共用一条 SQL
- 修复 dashboard '待处理订单' KPI 4 一直显示 0 的问题
- 前端 dashboard.js 已读 summary.pending_orders ?? 0,无需改动
- 测试:
  - test_routes_stats_dashboard.py 加 test_dashboard_summary_pending_orders
    (3 pending + 2 paid + 1 serving + 1 refunded 验证 pending=3、revenue=30000、
    by_status.pending=3 与 summary.pending_orders 一致)
  - test_routes_stats_dashboard.py test_dashboard_empty_db_shape 更新 key 集
  - test_app.py test_create_app_bootstraps_orders_schema summary 等式加 pending_orders: 0
- 真实环境验证:admin/test-pass-123 登录后 11 orders / 7 pending 与 by_status 一致
2026-06-16 21:16:39 +08:00
..
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00