feat: 根目录文档、脚本、gitignore

This commit is contained in:
2026-10-08 16:15:33 +08:00
commit e98660ce4e
284 changed files with 26838 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
"""只读:两库最近 zt_action 活动对比,验证哪个是活跃测试库。"""
import io, sys, pymysql
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
DST = dict(host='192.168.1.161', user='devgps', password='dev@2021GPS',
charset='utf8mb4', connect_timeout=15)
conn = pymysql.connect(**DST); cur = conn.cursor()
for db in ['zentao_dev', 'zentao_dev_2026']:
cur.execute(f'USE `{db}`')
print(f'\n===== {db} 最近10条 action =====')
cur.execute("SELECT id, objectType, objectID, action, actor, date FROM zt_action ORDER BY id DESC LIMIT 10")
for r in cur.fetchall():
print(' ', r)
cur.execute("SELECT COUNT(*) FROM zt_action WHERE date >= '2026-07-30'")
print(f' 07-30 之后的 action 数: {cur.fetchone()[0]}')
conn.close()