项目初始化
This commit is contained in:
27
aliyun-sync/aps-aliyun-sync/check_db.py
Normal file
27
aliyun-sync/aps-aliyun-sync/check_db.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import pymysql
|
||||
|
||||
conn = pymysql.connect(
|
||||
host='8.156.34.195',
|
||||
port=23149,
|
||||
user='ray',
|
||||
password='GV0C$ErephgQO7RQc7b6',
|
||||
database='goonseek-dev',
|
||||
charset='utf8mb4',
|
||||
)
|
||||
cur = conn.cursor()
|
||||
|
||||
# 检查客户详情字段
|
||||
cur.execute('SELECT account_id, customer_name, phone, department FROM aps_customer LIMIT 5')
|
||||
rows = cur.fetchall()
|
||||
print(f'aps_customer ({len(rows)} rows):')
|
||||
for r in rows:
|
||||
print(f' {r}')
|
||||
|
||||
# 检查快照金额字段
|
||||
cur.execute('SELECT account_id, snapshot_month, last_month_payable_total_cny, current_month_payable_total_cny FROM aps_customer_snapshot LIMIT 5')
|
||||
rows2 = cur.fetchall()
|
||||
print(f'\naps_customer_snapshot ({len(rows2)} rows):')
|
||||
for r in rows2:
|
||||
print(f' {r}')
|
||||
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user