This commit is contained in:
2025-01-03 10:31:30 +08:00
parent e36c7f4810
commit ce9db4c25d
8 changed files with 177 additions and 66 deletions

25
dao/db/mysql.py Normal file
View File

@@ -0,0 +1,25 @@
from dao.db.util import *
def get_orders_count():
# 在mysql中读取统计订单数量
connect = get_connet()
sql = "SELECT * FROM order_name_yn LIMIT 100"
cursor = connect.cursor()
cursor.execute(sql)
result = cursor.fetchall()
cursor.close()
connect.close()
resu = []
for row in result:
resu.append(
{
"order_name": row[0],
"update_time": row[1],
"order_count": row[2]
}
)
return resu