From 367168bcdcfeb001bde02cbfec5b377f7205f7bd Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Thu, 23 Jul 2026 08:46:22 +0000 Subject: [PATCH] fix: <>ALL(%) parens + refresh_100_prefix add orderCount/goodsCount --- flows/sds/refresh_100_prefix.py | 2 ++ flows/shared/db.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flows/sds/refresh_100_prefix.py b/flows/sds/refresh_100_prefix.py index b2b1705..23f9244 100644 --- a/flows/sds/refresh_100_prefix.py +++ b/flows/sds/refresh_100_prefix.py @@ -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 diff --git a/flows/shared/db.py b/flows/shared/db.py index 354cd38..6d77e05 100644 --- a/flows/shared/db.py +++ b/flows/shared/db.py @@ -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()