fix: <>ALL(%) parens + refresh_100_prefix add orderCount/goodsCount
This commit is contained in:
@@ -78,6 +78,8 @@ def upsert_records(remote_map: dict, target_order_nos: list[str]) -> dict:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
stats = SyncDB().sync_orders_and_goods(order_inputs, goods_inputs)
|
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["skippedStillPending"] = skipped_pending
|
||||||
stats["skippedUnpaid"] = skipped_unpaid
|
stats["skippedUnpaid"] = skipped_unpaid
|
||||||
return stats
|
return stats
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ class SyncDB:
|
|||||||
with conn.cursor() as cur:
|
with conn.cursor() as cur:
|
||||||
cur.execute(
|
cur.execute(
|
||||||
'SELECT DISTINCT "orderNo" FROM "Orders" WHERE "systemName"=%s '
|
'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),
|
(system_name, exclude_statuses),
|
||||||
)
|
)
|
||||||
rows = cur.fetchall()
|
rows = cur.fetchall()
|
||||||
|
|||||||
Reference in New Issue
Block a user