修复了token认证错误

This commit is contained in:
2026-06-18 19:17:26 +08:00
parent d769dec2ec
commit 5c8b82df15
3 changed files with 82 additions and 1 deletions

27
check_prod_uid.py Normal file
View File

@@ -0,0 +1,27 @@
"""检查生产库中 UserUID 为空的用户"""
import pymysql
conn = pymysql.connect(
host='gvsds.com', port=50030,
user='root', password='sajksh.sdfGH3YUge.wjkd+',
database='xaio_cheng_xu', charset='utf8mb4'
)
cur = conn.cursor()
# UserUID 为 NULL 的用户数
cur.execute("SELECT COUNT(*) FROM user WHERE UserUID IS NULL OR UserUID = ''")
print(f'UserUID为空的用户数: {cur.fetchone()[0]}')
# 总用户数
cur.execute("SELECT COUNT(*) FROM user")
print(f'总用户数: {cur.fetchone()[0]}')
# 抽样 UserUID 为 NULL 的用户
cur.execute("SELECT UserUUID, UserName, OpenID, Phone FROM user WHERE UserUID IS NULL OR UserUID = '' LIMIT 5")
rows = cur.fetchall()
if rows:
print('\nUserUID为空的用户示例:')
for r in rows:
print(f' UserName={r[1]}, OpenID={r[2]}, Phone={r[3]}')
conn.close()