feat(invite): 发奖改「比价并下单」+ 好友 is_compared 状态 + DEV 造数/重置接口 #113

Merged
guke merged 2 commits from 7-1ljh-invite-reward-notest into main 2026-07-03 19:01:38 +08:00

2 Commits

Author SHA1 Message Date
no_gen_mu b0e2d7c8d7 refactor(invite): 移除 DEV 造数/重置接口(seed-fake、dev-reset)不入库
评审意见:POST/DELETE /invite/seed-fake、POST /invite/dev-reset 三个接口标注 [DEV]、
且 dev-reset 无鉴权,是本地测试用的造数/重置口子,不应合进 main。

删掉两处:
- app/api/v1/invite.py: 三个端点 handler
- app/repositories/invite.py: seed_fake_invitees / clear_fake_invitees / dev_reset_test_account

保留 is_compared 好友已比价状态、发奖改「比价并下单」、每日兑换定时器锁北京时区等产品改动。
纯删除,不影响其余接口(/me /invitees /bind /landing-track 均在)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 18:01:28 +08:00
no_gen_mu 4d821bec26 feat(invite): 发奖口径改为「比价并下单」+ 好友已比价状态(is_compared) + DEV 造数/重置接口
- 邀请发奖触发从「上报比价」改为「实际下单」(order.py + compare_record.py + repositories/invite.py)
- 好友列表返回 is_compared 已比价状态 (schemas/invite.py + repositories/invite.py)
- 新增 DEV 内部接口(生产 is_prod 一律 404):
  - POST/DELETE /invite/seed-fake 造/清虚拟好友(测在途、好友列表 UI)
  - POST /invite/dev-reset 把固定测试号打回出厂态(反复当新用户测发奖)
- fix(deploy): 每日兑换定时器锁北京时区 Asia/Shanghai (daily-exchange.service/.timer)

不含测试文件(tests/ 及 scripts/invite_reward_e2e.* 本地自用,不入库)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 17:13:50 +08:00