scripts/vas/get_all_order_ids.py

15 lines
286 B
Python

from lib.mysql import *
from lib.util import *
from lib.csv import *
sql = '''
select id from vas_order where order_status>0;
'''
csv_ = Csv("all_order_ids.csv", ["id"])
docs = get_mysql_db_vas().query(sql)
for doc in docs:
_id = safe_get_str(doc, "id")
csv_.append([[_id]])