Commit Graph

5 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
xiebing 19f5987436 feat(invite): 邀请奖励金账户(与金币隔离) + 比价发奖 + 奖励金提现 (#82)
Reviewed-on: #82
Co-authored-by: xiebing <xiebing@wonderable.ai>
Co-committed-by: xiebing <xiebing@wonderable.ai>
2026-06-26 21:10:21 +08:00
xiebing b2f5a53dd8 feat(invite): 被邀请人列表接口 + 指纹归因(任务3) (#31)
- GET /invitees: 分页 + 名字降级兜底(昵称→微信昵称→脱敏手机号)
- 指纹归因: 落地页采集 + (IP,设备型号)反查撞库 + 时间窗口闸
- test_invite: +5 个列表测试(脱敏/倒序/昵称优先/分页/空), 修指纹测试跨用例串味

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Reviewed-on: #31
Co-authored-by: xiebing <xiebing@wonderable.ai>
Co-committed-by: xiebing <xiebing@wonderable.ai>
2026-06-09 21:48:48 +08:00
marco 4d392f44f5 feat(invite): 好友邀请后端(注册即生效,邀请人+被邀请人各发1万金币) (#24)
- user.invite_code 列 + invite_relation 表(invitee_user_id 唯一 = 幂等防重复发奖)
- GET /api/v1/invite/me(我的码+分享链接+战绩)、POST /api/v1/invite/bind
- 复用 wallet.grant_coins 同事务发币;自邀屏蔽 / 无效码 / 新用户闸(注册72h内才发)
- alembic 迁移(11a1d08c6f55 -> invite_code_and_relation)+ 8 个测试(钱路/幂等/并发兜底全覆盖)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Reviewed-on: #24
2026-06-08 04:57:55 +08:00