From 50df07aa2044e6ee22900be9b0f9878fc7de3d7d Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Thu, 9 May 2024 01:45:19 +0800 Subject: [PATCH] fix --- account/fix.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/account/fix.py b/account/fix.py index a78611c..f34a6ed 100644 --- a/account/fix.py +++ b/account/fix.py @@ -69,15 +69,22 @@ class S: "ct": 1, } docs = self.col_account.find(query=q, projection=prj) + sort_dict_list(docs, 'ct') + first_mid = safe_get_int(docs[0], "_id") has_order_mids = list() + to_delete_mids = list() for doc in docs: mid = safe_get_int(doc, "_id") + if first_mid > 0: + continue orders = self.get_orders(mid) if len(orders) > 0: has_order_mids.append(mid) + else: + to_delete_mids.append(mid) - print(has_order_mids) + print(phone, len(docs), len(to_delete_mids)) s = S()