server/说明文档.md
shanshanzhong b57221598d
Some checks failed
Build docker and publish / build (20.15.1) (push) Has been cancelled
docs: add project documentation
2026-01-15 17:26:03 -08:00

15 lines
816 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 项目说明文档
## 1. 项目规划
- [ ] 核心业务逻辑维护与Bug修复
- [ ] 确保支付与订单流程闭环
## 2. 实施方案
- **订单状态修复**:针对支付后订单状态未更新问题,完善异步任务的错误处理机制。
## 3. 进度记录
- **2026-01-15 [已完成] 修复订单状态更新 Bug**
- **问题描述**:用户支付成功后,订单状态停留在“已支付”,未流转到“已完成”,导致订阅未下发。
- **原因分析**`finalizeCouponAndOrder` 函数在更新数据库失败时仅打印日志未返回错误,导致 Asynq 消息队列误判任务成功,未触发重试机制。
- **解决方案**:重构该函数及其调用方 `ProcessTask`,确保数据库更新错误能向上抛出,触发 Asynq 的自动重试策略。