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
+4
View File
@@ -1,6 +1,8 @@
import type { Server } from 'node:http'
import { stopKuaishouIndustrySendCallbackRetryWorker } from '../services/platforms/kuaishou-industry/send-code-service.js'
import { stopIntegrationOutboxWorker } from '../services/integration/outbox-worker.js'
import { stopDouyuFulfillmentReconciler } from '../services/douyu-fulfillment/fulfillment-reconciler.js'
import { stopScheduledJobs } from '../services/scheduler/scheduler-service.js'
import { closeDb } from '../db/client.js'
import { logError, logInfo } from '../utils/logger.js'
@@ -28,6 +30,8 @@ export function createShutdownController(
stopScheduledJobs()
stopKuaishouIndustrySendCallbackRetryWorker()
stopIntegrationOutboxWorker()
stopDouyuFulfillmentReconciler()
if (server.listening) {
await new Promise<void>((resolve) => {