feat: Orders 加 10 地址/店铺字段 + labelPdfUrl(SDS/RIIN mapper+db)

This commit is contained in:
yeuimu
2026-07-23 16:05:46 +00:00
parent 2b8a2b65f4
commit 8ab0aededa
3 changed files with 45 additions and 4 deletions
+12 -2
View File
@@ -231,7 +231,9 @@ class SyncDB:
'''INSERT INTO "Orders" (
"orderNo","outOrderNo","courierSource","courierName","courierNo","merchantId",
"countryRegion","factoryName","systemName","systemStatus","platformName","platformStatus",
"createdAt","orderedAt","confirmedAt","completedAt","shipDeadline"
"createdAt","orderedAt","confirmedAt","completedAt","shipDeadline",
"consigneeName","destinationCountry","stateProvince","city",
"addressLine1","addressLine2","addressLine3","postalCode","storeName","labelPdfUrl"
) VALUES %s
ON CONFLICT ("orderNo","createdAt") DO UPDATE SET
"outOrderNo"=EXCLUDED."outOrderNo","courierSource"=EXCLUDED."courierSource",
@@ -241,11 +243,19 @@ class SyncDB:
"systemStatus"=EXCLUDED."systemStatus","platformName"=EXCLUDED."platformName",
"platformStatus"=EXCLUDED."platformStatus","orderedAt"=EXCLUDED."orderedAt",
"confirmedAt"=EXCLUDED."confirmedAt","completedAt"=EXCLUDED."completedAt",
"shipDeadline"=EXCLUDED."shipDeadline"''',
"shipDeadline"=EXCLUDED."shipDeadline",
"consigneeName"=EXCLUDED."consigneeName",
"destinationCountry"=EXCLUDED."destinationCountry",
"stateProvince"=EXCLUDED."stateProvince","city"=EXCLUDED."city",
"addressLine1"=EXCLUDED."addressLine1","addressLine2"=EXCLUDED."addressLine2",
"addressLine3"=EXCLUDED."addressLine3","postalCode"=EXCLUDED."postalCode",
"storeName"=EXCLUDED."storeName","labelPdfUrl"=EXCLUDED."labelPdfUrl"''',
[(
o.orderNo, o.outOrderNo, o.courierSource, o.courierName, o.courierNo, o.merchantId,
o.countryRegion, o.factoryName, o.systemName, o.systemStatus, o.platformName, o.platformStatus,
o.createdAt, o.orderedAt, o.confirmedAt, o.completedAt, o.shipDeadline,
o.consigneeName, o.destinationCountry, o.stateProvince, o.city,
o.addressLine1, o.addressLine2, o.addressLine3, o.postalCode, o.storeName, o.labelPdfUrl,
) for o in orders],
page_size=ORDER_CHUNK,
)