- 新增商品服务定价配置表,支持多规格服务价格体系 - 新增步梯搬运费配置功能,可按楼层阶梯收费 - 重构支付订单台账,新增核心数据统计卡片 - 优化下单流程,支持定价配置校验与增项计算 - 整合财务配置,移除独立充值配置菜单
37 行
1.1 KiB
Python
37 行
1.1 KiB
Python
import pymysql
|
|
import paramiko
|
|
|
|
# 本地数据库
|
|
local_conn = pymysql.connect(
|
|
host='127.0.0.1',
|
|
user='yjyf',
|
|
password='4bRz2NYz6pDhsCk4',
|
|
database='yjyf',
|
|
port=3306,
|
|
charset='utf8mb4'
|
|
)
|
|
with local_conn.cursor() as cur:
|
|
cur.execute("SHOW TABLES")
|
|
local_tables = [row[0] for row in cur.fetchall()]
|
|
local_conn.close()
|
|
|
|
# 远程数据库
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
ssh.connect('8.137.181.63', port=22, username='root', password='liyanxia@6688', timeout=15)
|
|
stdin, stdout, stderr = ssh.exec_command("mysql -uyjyf -pyjyf yjyf -e 'SHOW TABLES;'")
|
|
remote_out = stdout.read().decode('utf-8')
|
|
ssh.close()
|
|
|
|
remote_tables = [l.strip() for l in remote_out.strip().splitlines() if l.strip() and l.strip() != 'Tables_in_yjyf']
|
|
|
|
print(f"Local tables count: {len(local_tables)}")
|
|
print(f"Remote tables count: {len(remote_tables)}")
|
|
|
|
diff = set(local_tables) - set(remote_tables)
|
|
if diff:
|
|
print(f"Tables in local but not remote: {diff}")
|
|
diff_remote = set(remote_tables) - set(local_tables)
|
|
if diff_remote:
|
|
print(f"Tables in remote but not local: {diff_remote}")
|