feat(fulfillment): 增加 Clean Cutover,历史任务隔离到人工入口
- 新增 flow_version,存量任务回填 1,Cutover 后新任务写 2 - 迁移设置 clean_flow_started_at,按订单支付/创建时间判定 - 自动选号只处理 clean 任务 - 工作台新增历史任务 Tab,历史列表不受订单起算时间限制 - 历史任务不参与自动重试和预售台账同步 - 补充流程边界测试和计划文档
This commit is contained in:
@@ -23,6 +23,7 @@ from .common import (
|
||||
AUTO_SYNC_INTERVAL_SECONDS,
|
||||
SCOPE_ELITE,
|
||||
TARGET_PLATFORM,
|
||||
_flow_version_for_order,
|
||||
_jsonable,
|
||||
_now,
|
||||
_order_match_started_at,
|
||||
@@ -181,6 +182,11 @@ def _upsert_order_snapshot(
|
||||
),
|
||||
target_platform=TARGET_PLATFORM,
|
||||
scope=SCOPE_ELITE,
|
||||
flow_version=_flow_version_for_order(
|
||||
db,
|
||||
paid_at=paid_at,
|
||||
created_at=order_created_at,
|
||||
),
|
||||
created_at=_now(),
|
||||
updated_at=_now(),
|
||||
)
|
||||
@@ -534,6 +540,11 @@ def _sync_pending_tasks(
|
||||
source_order_id=str(row.get("source_order_id") or ""),
|
||||
source_order_item_id=item_id,
|
||||
source_fulfillment_id=str(row.get("source_fulfillment_id") or ""),
|
||||
flow_version=_flow_version_for_order(
|
||||
db,
|
||||
paid_at=_parse_snapshot_datetime(row.get("paid_at")),
|
||||
created_at=_now(),
|
||||
),
|
||||
created_at=_now(),
|
||||
updated_at=_now(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user