feat(fulfillment): 增加事务 Outbox 同步履约状态

- 用事务 Outbox 和签名 Webhook 替换直接状态回调
- 增加 Outbox 投递 worker、重试与低频对账兜底
- 缓存客户领取页绑定状态并补充签名与迁移测试
This commit is contained in:
yml
2026-11-18 11:00:28 +08:00
parent 54b9f3251d
commit 9b2fcf1d1f
23 changed files with 1324 additions and 130 deletions
+3 -3
View File
@@ -2,8 +2,8 @@ import { Router } from 'express'
import {
confirmDouyuCustomerBinding,
getDouyuCustomerFulfillmentCached,
getCustomerDouyuFulfillment,
refreshDouyuCustomerBinding,
saveDouyuCustomerProfile,
startDouyuCustomerBinding,
} from '../services/douyu-fulfillment/douyu-fulfillment-service.js'
@@ -46,8 +46,8 @@ router.post(
router.get(
'/:orderNo/binding/status',
createRouteHandler((req) => refreshDouyuCustomerBinding(String(req.params.orderNo || '')), {
errorMessage: '刷新绑定状态失败',
createRouteHandler((req) => getDouyuCustomerFulfillmentCached(String(req.params.orderNo || '')), {
errorMessage: '读取绑定状态失败',
scope: '[douyu-fulfillment/:orderNo/binding/status]',
}),
)