feat(welfare): savings/battle 返回 compare_count(累计完成比价次数)

- SavingsBattle 仓储/schema/接口新增 compare_count(= 有效记录数,与 order_count 同源)
- 更新 docs/api/savings-battle.md 与 tests/test_welfare.py 断言

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
OuYingJun1024
2026-06-05 10:45:21 +08:00
parent 0b8037c725
commit 1893c01f54
5 changed files with 11 additions and 2 deletions
+1
View File
@@ -42,6 +42,7 @@ def battle(user: CurrentUser, db: DbSession) -> SavingsBattleOut:
week_saved_cents=b.week_saved_cents,
beat_percent=b.beat_percent,
streak_days=b.streak_days,
compare_count=b.compare_count,
)