feat(fulfillment): 增加签名 Webhook 事务 Outbox

- 新增直播履约状态事务 Outbox 与签名投递 worker
- 增加 order_site 状态回传、重试和低频对账兜底
- 补充 Outbox、签名校验与集成接口测试
This commit is contained in:
yml
2026-11-18 10:59:20 +08:00
parent 00c4a268c2
commit bba3d9dac9
17 changed files with 967 additions and 114 deletions
@@ -2,7 +2,6 @@
from __future__ import annotations
import logging
from typing import Any
from fastapi import APIRouter, Depends, Query
@@ -21,7 +20,6 @@ from ..services.audit_service import record_audit
from ..services.platform_fulfillment import service
router = APIRouter(prefix="/api/platform-fulfillment", tags=["直播账号履约"])
logger = logging.getLogger(__name__)
@router.get("/settings")
@@ -65,10 +63,6 @@ def list_tasks(
current: User = Depends(require_permission("platform_fulfillment:view")),
) -> dict[str, Any]:
del current
try:
service.sync_pending_tasks_if_due(db, limit=100)
except Exception as exc: # noqa: BLE001
logger.warning("自动同步待履约订单失败,继续返回本地任务: %s", exc)
return service.list_tasks(
db,
status=status,