Commit Graph

18 Commits

Author SHA1 Message Date
qzl 98f4a8d07a fix: update production app configuration 2026-04-30 11:07:57 +08:00
ZL-Q 86062d5e78 fix: 修复 packages 接口访问不存在字段导致的运行时错误
- 移除 router 中对 result.region、result.currency、pkg.price 的访问
- 修正 pkg.type.value 为 pkg.type (type 是 Literal 不是 Enum)
- 更新协议文档以反映实际实现
- 新增 Apple IAP 协议文档
- 标记未使用的错误码为 RESERVED
2026-04-28 17:31:24 +08:00
ZL-Q 295dbc09ab feat(payment): 优化套餐配置和支付服务
- 简化套餐配置结构,删除冗余的 default.yaml 和 us.yaml
- 优化 Apple IAP 服务和验证逻辑
- 更新套餐数据模型和协议文档
- 添加支付相关测试用例
2026-04-28 17:21:14 +08:00
ZL-Q 87f92987b2 feat: 实现 iOS Apple Pay 内购支付功能
前端:
- 集成 in_app_purchase 插件,实现 IAP 支付流程
- 添加支付模块 (payments/) 处理产品获取、购买、验证
- 积分中心页面集成 Apple Pay 购买入口
- 设置页面重构: 关于/隐私/协议直接展示,删除 legal_center 子页面
- 修复欢迎引导页滚动检测阈值问题
- 修复解卦结果页 iOS 侧滑返回手势被阻止的问题
- 邀请码绑定按钮临时禁用(待后端实现)

后端:
- 新增 apple_iap_transactions 表记录交易
- 实现 Apple 服务器端验证 (App Store Server API)
- 支付成功后自动发放积分
- 支持 Sandbox/Production 环境切换
- 添加退款处理和交易状态机

协议:
- 更新积分流水协议,支持 purchase/refund 类型
- 新增 PAYMENT_* 错误码
2026-04-28 10:45:29 +08:00
qzl 6a2a9d2c87 feat(feedback): implement user feedback collection system with email reporting
Backend:
- Add user_feedback table with RLS policy
- Create feedback submission API (multipart/form-data)
- Implement xlsx report generation with embedded images
- Add scheduled email delivery via Feishu SMTP
- Create HTML email templates (daily_report, no_feedback)

Frontend:
- Add feedback screen with type selection and image picker
- Support anonymous submission via skipAuth flag
- Collect device info and app version

Protocol:
- Document feedback API contract and error codes
- Update http-error-codes.md with FEEDBACK_* codes
2026-04-20 12:49:54 +08:00
qzl ff40ff9dd8 feat: 新人初始礼包购买追踪功能
- 数据库:添加 has_purchased_starter_pack 字段到 register_bonus_claims
- 后端:创建静态配置管理套餐信息,支持按国家/地区区分
- 后端:新增 GET /api/v1/points/packages API 返回可用套餐
- 后端:创建 utils/paths.py 统一路径管理
- 前端:动态获取套餐信息,移除硬编码
- 前端:添加 ProductCode 枚举约束,前后端类型安全
- 配置:Profile 默认国家改为 US(ISO 3166-1 alpha-2)
- 文档:更新协议文档说明新 API 和字段
2026-04-16 16:11:09 +08:00
qzl 443c0c80ae fix: 修复后端代码违规并更新协议文档
- 修复 notifications 模块 datetime.now() 缺少时区问题
- 用 ApiProblemError 替换 BaseService 中的 HTTPException
- 更新协议文档:添加错误码、繁体字段、邀请相关协议
- 升级 Docker 镜像版本
2026-04-16 10:51:08 +08:00
qzl 921ffa1c50 docs: add application initialization contract to user-points protocol 2026-04-13 11:35:15 +08:00
qzl c55be6d3fd fix: preserve points balance across account re-registration
Persist a per-email balance snapshot before account deletion and restore it on same-email re-registration, preventing both unintended balance reset and repeated signup bonus grants.
2026-04-13 11:28:58 +08:00
qzl 3f3d613d99 feat: 实现站内通知系统
- 后端: 新增 notifications/user_notifications 表迁移及 ORM 模型
- 后端: 实现 schema/repository/service/router 全套通知 API
  - GET /api/v1/notifications (列表+游标分页)
  - GET /api/v1/notifications/unread-count
  - PATCH /api/v1/notifications/{id}/read (幂等)
  - PATCH /api/v1/notifications/mark-all-read (幂等)
- 后端: payload 使用 Pydantic discriminated union (none/open_route/open_url)
- 后端: 19 个单元测试全部通过
- Flutter: 通知 feature 完整实现 (models/apis/repositories/bloc/UI)
- Flutter: Home 页通知按钮接入真实页面,显示未读 badge
- Flutter: 14 个测试全部通过
- 协议文档: notification-inbox-protocol.md 及错误码注册
2026-04-10 18:50:08 +08:00
qzl 17ef460391 docs: 更新 HTTP 错误码、用户积分、占卜运行及用户资料协议文档 2026-04-10 16:45:45 +08:00
qzl 0ac8b81a66 feat: 添加 points_audit_ledger 及 JSON 字段 Pydantic Schema 约束 2026-04-10 12:28:18 +08:00
qzl 46513829cd feat: 添加账号删除功能 2026-04-10 10:40:44 +08:00
qzl e80a82bef4 docs: 更新协议文档,删除废弃计划文档
- 更新 http-error-codes, user-points-chat-data-protocol
- 更新 divination-run-protocol, profile-protocol
- 删除废弃的后端和前端设计计划文档
2026-04-08 17:23:02 +08:00
ZL-Q 8a18b3528b feat: 实现用户画像、占卜历史与后端用户管理模块 2026-04-06 01:28:10 +08:00
qzl d87b2e1e3a feat: 接入起卦后端流程并完善积分扣减链路 2026-04-03 19:04:46 +08:00
qzl f245eec5f6 feat: 实现起卦、设置与积分系统 2026-04-03 16:56:47 +08:00
qzl 31594558eb feat: 切换邮箱认证并重构前后端启动与门禁 2026-04-02 18:39:35 +08:00