|
|
@@ -18,21 +18,21 @@ Draft
|
|
|
|
|
|
## Tasks / Subtasks
|
|
|
- [ ] 在 PaymentMtService 中实现 updateOrderPaymentStatus 方法 (AC: 2, 3, 4, 6)
|
|
|
- - [ ] 添加方法签名:`updateOrderPaymentStatus(tenantId: number, externalOrderId: number, payState: number): Promise<void>`
|
|
|
- - [ ] 注入 OrderMtService 依赖
|
|
|
+ - [ ] 在 `packages/mini-payment-mt/src/services/payment.mt.service.ts` 中添加方法签名:`updateOrderPaymentStatus(tenantId: number, externalOrderId: number, payState: number): Promise<void>`
|
|
|
+ - [ ] 注入 OrderMtService 依赖(来自 `packages/orders-module-mt/src/services/order.mt.service.ts`)
|
|
|
- [ ] 实现订单状态更新逻辑,支持多租户隔离
|
|
|
- [ ] 记录支付时间和微信交易流水号
|
|
|
- [ ] 完善 handlePaymentCallback 方法中的 TODO 注释 (AC: 1, 2, 6)
|
|
|
- - [ ] 在支付成功时调用 updateOrderPaymentStatus 更新订单状态为 2(已支付)
|
|
|
+ - [ ] 在 `packages/mini-payment-mt/src/services/payment.mt.service.ts:275` 的 TODO 处,在支付成功时调用 updateOrderPaymentStatus 更新订单状态为 2(已支付)
|
|
|
- [ ] 在支付失败时调用 updateOrderPaymentStatus 更新订单状态为 4(支付失败)
|
|
|
- [ ] 在退款时调用 updateOrderPaymentStatus 更新订单状态为 3(已退款)
|
|
|
- [ ] 增强支付回调日志记录 (AC: 5)
|
|
|
- - [ ] 在回调处理的各个关键节点添加详细的调试日志
|
|
|
+ - [ ] 在 `packages/mini-payment-mt/src/services/payment.mt.service.ts` 的回调处理各个关键节点添加详细的调试日志
|
|
|
- [ ] 记录回调数据、验证结果、状态更新过程
|
|
|
- [ ] 确保日志包含租户ID用于多租户追踪
|
|
|
- [ ] 编写单元测试和集成测试 (AC: 1-6)
|
|
|
- - [ ] 为 updateOrderPaymentStatus 方法编写单元测试
|
|
|
- - [ ] 为 handlePaymentCallback 方法编写集成测试
|
|
|
+ - [ ] 在 `packages/mini-payment-mt/tests/unit/payment-service.unit.test.ts` 中为 updateOrderPaymentStatus 方法编写单元测试
|
|
|
+ - [ ] 在 `packages/mini-payment-mt/tests/integration/payment-callback.integration.test.ts` 中为 handlePaymentCallback 方法编写集成测试
|
|
|
- [ ] 验证多租户隔离功能
|
|
|
- [ ] 测试各种支付状态转换场景
|
|
|
|