feat: 详细日志(分页/映射/批次进度)+ Artifacts 摘要(sync-summary/verify-report)

This commit is contained in:
yeuimu
2026-07-23 09:01:39 +00:00
parent 367168bcdc
commit 4ec7cf2dd6
18 changed files with 154 additions and 22 deletions
+3 -2
View File
@@ -9,8 +9,8 @@ from prefect import flow, task
from api.sds.models import OrderPageRequest
from flows.shared import (
SyncDB, create_sds_client, get_channel_type_map,
refresh_channel_type_map, resolve_courier_source,
SyncDB, build_stats_rows, create_sds_client, emit_sync_summary,
get_channel_type_map, refresh_channel_type_map, resolve_courier_source,
)
from flows.shared.mappers import map_sds_goods, map_sds_order
@@ -99,6 +99,7 @@ def sds_refresh_100_prefix() -> dict:
remote = fetch_remote(order_nos)
stats = upsert_records(remote, order_nos)
print(f"完成: 刷新 {stats['orderCount']} / 仍待分配 {stats.get('skippedStillPending',0)} / 待付款 {stats.get('skippedUnpaid',0)}")
emit_sync_summary("SDS 100前缀刷新", build_stats_rows("SDS", stats, [("目标订单", len(order_nos))]))
return {"targetCount": len(order_nos), **stats}