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
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
import io, sys, pymysql
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
conn = pymysql.connect(host='192.168.1.161', user='devgps', password='dev@2021GPS',
database='zentao_dev_2026', charset='utf8mb4')
cur = conn.cursor()
def q(sql):
cur.execute(sql); return cur.fetchall()
print("### 测试人员(CS)及其授权产品")
for r in q("SELECT account, realname, user_type, product_ids FROM zt_user WHERE user_type IN (SELECT id FROM base_user_type WHERE code='CS') OR user_type='CS'"):
print(r)
print("\n-- user_type 取值分布 --")
for r in q("SELECT user_type, COUNT(*) FROM zt_user GROUP BY user_type"):
print(r)
print("\n-- base_user_type 表 --")
try:
for r in q("SELECT id, code, name FROM base_user_type"):
print(r)
except Exception as e:
print("ERR", e)