This commit is contained in:
lwl0608 2024-05-09 01:45:19 +08:00
parent 434e8e3668
commit 50df07aa20
1 changed files with 8 additions and 1 deletions

View File

@ -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()