Files

11 lines
603 B
Python

# -*- 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()
cur.execute("SELECT COUNT(*) total, SUM(tostory>0) has_tostory, SUM(story>0) has_story FROM zt_bug WHERE deleted='0'")
print("全库 Bug:", cur.fetchone())
cur.execute("SELECT COUNT(*), SUM(tostory>0), SUM(story>0) FROM zt_bug WHERE deleted='0' AND openeddate>='2026-01-01'")
print("2026年 Bug:", cur.fetchone())