feat: 根目录文档、脚本、gitignore
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
# -*- 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', autocommit=False)
|
||||
cur = conn.cursor()
|
||||
cur.execute("SELECT id, deleted FROM zt_bug WHERE id IN (2566,2567,2568,2569,2570)")
|
||||
rows = cur.fetchall()
|
||||
assert len(rows)==5 and all(r[1]=='0' for r in rows), "状态异常,中止"
|
||||
cur.execute("UPDATE zt_bug SET deleted='1' WHERE id IN (2566,2567,2568,2569,2570)")
|
||||
print("删除行数:", cur.rowcount)
|
||||
conn.commit()
|
||||
cur.execute("SELECT id, deleted FROM zt_bug WHERE id IN (2566,2567,2568,2569,2570)")
|
||||
print("删后:", cur.fetchall())
|
||||
Reference in New Issue
Block a user