fix
This commit is contained in:
parent
e2856dd203
commit
a57af3ea61
|
@ -42,6 +42,7 @@ class Mysql:
|
||||||
return cursor.fetchall()
|
return cursor.fetchall()
|
||||||
|
|
||||||
|
|
||||||
mysql_db_vas = Mysql(
|
def get_mysql_db_vas():
|
||||||
|
return Mysql(
|
||||||
"rm-bp11t1616a1kjvmx5.mysql.rds.aliyuncs.com", 3306, "vas", "root", "Wishpal2024"
|
"rm-bp11t1616a1kjvmx5.mysql.rds.aliyuncs.com", 3306, "vas", "root", "Wishpal2024"
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
from lib.all import *
|
||||||
|
|
||||||
|
mysql = get_mysql_db_vas()
|
||||||
|
|
||||||
|
data = Csv("id_pair.csv").read_all()
|
||||||
|
for d in data:
|
||||||
|
_id = d[0]
|
||||||
|
oid3 = d[1]
|
||||||
|
sql = '''update vas_order set oid3="%s" where id="%s"'''
|
||||||
|
|
||||||
|
mysql.exec(sql, (oid3, _id))
|
||||||
|
print(_id)
|
||||||
|
break
|
|
@ -8,7 +8,7 @@ select id from vas_order where order_status>0;
|
||||||
|
|
||||||
csv_ = Csv("all_order_ids.csv", ["id"])
|
csv_ = Csv("all_order_ids.csv", ["id"])
|
||||||
|
|
||||||
docs = mysql_db_vas.query(sql)
|
docs = get_mysql_db_vas().query(sql)
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
_id = safe_get_str(doc, "id")
|
_id = safe_get_str(doc, "id")
|
||||||
csv_.append([[_id]])
|
csv_.append([[_id]])
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue