feat(invite): 好友邀请后端(注册即生效,邀请人+被邀请人各发1万金币) #24

Merged
marco merged 2 commits from feat/invite-mvp into main 2026-06-08 04:57:56 +08:00
Owner
  • 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

- 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>
marco added 1 commit 2026-06-08 03:21:37 +08:00
- 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>
marco added 1 commit 2026-06-08 04:51:19 +08:00
- docs/邀请功能-实现原理与本地测试.md: 跨前后端实现 + 剪贴板 deferred-deeplink 归因原理
  + 本地内网测试全流程(起后端 / 编 debug 包 / 两台真机) + 上线前待办(alembic 多 head / release 包 / 风控)
- data/media/dl.html: 落地页纳入 git(.gitignore 加例外, apk 等大文件仍忽略);
  APK_URL 改 location.origin 随页面 host 自动适配, 免按机器改 IP
- docs/README.md: 文档索引补一行

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
marco merged commit 4d392f44f5 into main 2026-06-08 04:57:56 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WonderableAI/shaguabijia-app-server#24