feat: 根目录文档、脚本、gitignore
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# -*- 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("-- zt_user.user_type 分布 --")
|
||||
for r in q("SELECT user_type, COUNT(*) FROM zt_user WHERE deleted='0' GROUP BY user_type"):
|
||||
print(r)
|
||||
print("\n-- 测试相关账号(孙颖 sunying / 张富斌 zhangfubin 等)--")
|
||||
for r in q("SELECT account, realname, user_type, product_ids FROM zt_user WHERE deleted='0' AND (realname LIKE '%颖%' OR realname LIKE '%富斌%' OR realname LIKE '%测试%')"):
|
||||
print(r)
|
||||
print("\n-- 6月有测试任务的账号 --")
|
||||
for r in q("""SELECT t.assignedTo, u.realname, COUNT(*) c FROM zt_task t LEFT JOIN zt_user u ON u.account=t.assignedTo
|
||||
WHERE t.type='test' AND t.deleted='0' AND t.finishedDate>='2026-06-01' AND t.finishedDate<'2026-07-01' GROUP BY t.assignedTo"""):
|
||||
print(r)
|
||||
Reference in New Issue
Block a user