This commit is contained in:
lwl0608 2024-02-19 20:45:10 +08:00
parent e2856dd203
commit a57af3ea61
4 changed files with 1171 additions and 4 deletions

View File

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

13
vas/fill_oid3.py Normal file
View File

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

View File

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

1153
vas/id_pair.csv Normal file

File diff suppressed because it is too large Load Diff