wangjia
|
af15f4736e
|
fix(v2): MarkAttemptPaid 按单scope+校验attempt命中 + OpenTestDB 唯一库名
- attempt UPDATE 加 out_trade_no 过滤并检查 RowsAffected,防止 order 已翻
paid 但 providerRef 错配导致没有对应 attempt 被标记的账本背离(未命中
时返回 error 触发事务回滚,order 保持 pending)
- 补测试覆盖 providerRef 错配场景:断言返回 error 且回滚后订单仍 pending
- OpenTestDB 改为每次调用生成唯一内存库名(atomic 计数器),避免同包多
测试共享 file::memory:?cache=shared 导致数据串扰
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-07-10 08:35:22 +08:00 |
|