fix(#1895): points API 字段对齐(P0 修复 + P1 补全) #1951
Reference in New Issue
Block a user
Delete Branch "fix/1895-points-api-align"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P0 阻塞项修复
P1 补全
测试
P0 fixes: - POST /points/check: unknown scene_key returns 400 (UNKNOWN_SCENE) instead of 500 - POST /points/recharge: response now includes points_amount, pay_params (empty dict until payment integration), expire_at (48h from creation) P1 additions: - PointRuleItem.description: Chinese description for each scene for frontend display - GET /points/rules: returns description field - GET /subscription/plans (new): returns all membership tiers with price/duration/discount/features - FREE_USER_MULTIPLIER confirmed: applied to both display AND actual deduction (calculate_points_cost is the single source of truth; ai_title non-member = ceil(1*1.15)=2) Decisions: - PointsBalanceResponse.is_member/member_type/member_expires_at: kept but marked deprecated (frontend already calls /points/subscription/membership); removal in future - Refund transactions: type='add' with source prefix 'refund:{scene}' (no separate refund type) - pay_params currently {} — to be filled when WeChat/Alipay is integrated Tests: 10 new tests in test_points_routes.py covering all above behaviors. Full suite: 15523 passed.🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1951 已关闭或合并,对应的预览环境已被清理。