fix: <>ALL(%) parens + refresh_100_prefix add orderCount/goodsCount

This commit is contained in:
yeuimu
2026-07-23 08:46:22 +00:00
parent 53ff943ac3
commit 367168bcdc
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -78,6 +78,8 @@ def upsert_records(remote_map: dict, target_order_nos: list[str]) -> dict:
pass
stats = SyncDB().sync_orders_and_goods(order_inputs, goods_inputs)
stats["orderCount"] = len(order_inputs)
stats["goodsCount"] = len(goods_inputs)
stats["skippedStillPending"] = skipped_pending
stats["skippedUnpaid"] = skipped_unpaid
return stats
+1 -1
View File
@@ -46,7 +46,7 @@ class SyncDB:
with conn.cursor() as cur:
cur.execute(
'SELECT DISTINCT "orderNo" FROM "Orders" WHERE "systemName"=%s '
'AND ("systemStatus" IS NULL OR "systemStatus" <> ALL %s)',
'AND ("systemStatus" IS NULL OR "systemStatus" <> ALL(%s))',
(system_name, exclude_statuses),
)
rows = cur.fetchall()