• Joined on 2026-05-02
wangdl commented on issue wangdl/api-server#347 2026-06-24 21:40:56 +08:00
[M-MEMBER-01] 实现 App Store Server Notifications V2 Durable Inbox 与生命周期投影

开发完成评论

完成内容

1. POST /webhooks/app-store/v2(@Public)

  • AppStoreNotificationController:接收 signedPayload,快速 200 后异步处理
  • @Public()
wangdl commented on issue wangdl/api-server#346 2026-06-24 21:35:49 +08:00
[M-MEMBER-01] 实现 App Store JWS 交易验证与幂等会员发放

N1-N5 修复

N1:幂等检查移入事务 + P2002 catch

  • 移除了事务外的 findUnique 预检查
  • 事务内 create 抛 P2002 → catch → 重新查询 → 返回 `{ status:…
wangdl commented on issue wangdl/api-server#346 2026-06-24 21:34:27 +08:00
[M-MEMBER-01] 实现 App Store JWS 交易验证与幂等会员发放

B1 修复:完整 x5c 证书链验证

问题

旧实现从 JWS header 的 x5c[0] 提取叶子证书并直接用于签名验证,不检查证书是否由 Apple 根 CA 签发。攻击者可…

wangdl commented on issue wangdl/api-server#346 2026-06-24 21:28:54 +08:00
[M-MEMBER-01] 实现 App Store JWS 交易验证与幂等会员发放

开发完成评论

完成内容

1. AppStoreJwsVerifier

  • 从 JWS header x5c 证书链提取叶子证书 → 构建 JWK → jose createLocalJWKSet 验证签名
  • 支持 ES256 算法 -…
wangdl commented on issue wangdl/api-server#345 2026-06-24 21:26:05 +08:00
[M-MEMBER-01] 实现 EffectiveMembership 与普通用户会员只读 API

N1/N2 修复

N1:/membership/me 已增加 entitlements + usageSummary

  • membership.controller.ts:63-80:内联调用 getEntitlements()
  • 返回字段对齐 ADR §12.2:effectivePla…
wangdl commented on issue wangdl/api-server#345 2026-06-24 21:21:58 +08:00
[M-MEMBER-01] 实现 EffectiveMembership 与普通用户会员只读 API

开发完成评论

完成内容

1. EffectiveMembershipService

  • compute(userId):查询所有 UserMembership → 过滤有效 Grant → 判定 effectivePlan
  • 有效规则:status…
wangdl commented on issue wangdl/api-server#344 2026-06-24 21:12:57 +08:00
[M-MEMBER-01] 新增不可变 App Store 交易、通知 Inbox 与 Payload 审计模型

开发完成评论

完成内容

1. AppStoreTransaction(新增)

  • 18 个字段,transactionId UNIQUE
  • userId/membershipId/productId/originalTransactionId/appAccountToken/environm…
wangdl commented on issue wangdl/api-server#343 2026-06-24 21:09:36 +08:00
[M-MEMBER-01] Expand 账号令牌、商品映射、会员 Grant 与 PlanQuota Schema

N1/N2/N3 修复

N1:Migration 文件已生成

  • prisma/migrations/20260624000001_m_member_01_02_expand_schema/migration.sql
  • 包含 5 个操作:User ADD + UNIQUE、MembershipPlan…
wangdl commented on issue wangdl/api-server#343 2026-06-24 21:05:14 +08:00
[M-MEMBER-01] Expand 账号令牌、商品映射、会员 Grant 与 PlanQuota Schema

开发完成评论

完成内容

1. User.appAccountToken

  • appAccountToken String? @unique @db.Char(36)
  • UUID 格式,服务端生成,与 User.id 解耦
  • nullable 以支持分…
wangdl commented on issue wangdl/api-server#342 2026-06-24 21:02:50 +08:00
[M-MEMBER-01] 冻结 App Store 商品、Premium 权益数值与额度窗口

N1/N2 修复

N1:ADR §2.1 Product ID 已同步

  • premium_monthly / premium_yearlycloud.longde.aistudyapp.premium.monthly / cloud.longde.aistudyapp.premium.yearly -…
wangdl commented on issue wangdl/api-server#342 2026-06-24 20:59:48 +08:00
[M-MEMBER-01] 冻结 App Store 商品、Premium 权益数值与额度窗口

开发完成评论

完成内容

1. 创建产品决策冻结文档

docs/product/m-member-01-product-decisions.md(新建)——8 个章节:

  • §1 Product ID:`cloud.longde.aist…
wangdl closed issue wangdl/api-server#336 2026-06-24 20:54:21 +08:00
[M-QUIZ-01] Attempt 生命周期与答案可见性控制
wangdl closed issue wangdl/api-server#337 2026-06-24 20:54:21 +08:00
[M-QUIZ-01] 提交原子性与幂等控制
wangdl closed issue wangdl/api-server#338 2026-06-24 20:54:21 +08:00
[M-QUIZ-01] iOS 题目加载与 Attempt 生命周期对接
wangdl closed issue wangdl/api-server#339 2026-06-24 20:54:21 +08:00
[M-QUIZ-01] 冻结 choice、fill、judge 跨端契约并完善 fill 题型
wangdl closed issue wangdl/api-server#340 2026-06-24 20:54:21 +08:00
[M-QUIZ-01] 接入 Quiz 题型维度学习分析
wangdl closed issue wangdl/api-server#341 2026-06-24 20:54:21 +08:00
[M-QUIZ-01-GATE] Quiz 跨端答题闭环最终验收
wangdl opened issue wangdl/api-server#352 2026-06-24 20:48:45 +08:00
[M-MEMBER-01-GATE] 会员订阅、权益、额度与恢复购买最终验收
wangdl opened issue wangdl/api-server#351 2026-06-24 20:48:38 +08:00
[M-MEMBER-01] 完成 iOS 会员中心、额度展示、购买状态与合规入口
wangdl opened issue wangdl/api-server#350 2026-06-24 20:48:33 +08:00
[M-MEMBER-01] 实现 iOS StoreKit 2 核心、交易监听、恢复与测试基础