From c2369e9bee218a69c43b7f527cb273447a36d3c1 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Mon, 13 Apr 2026 22:46:33 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=92=A4=E9=94=80=E5=95=86=E4=B8=9A?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=8E=A5=E5=8F=A3500=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8CSELECT=E7=BC=BA=E5=B0=91display=5Fname=E5=92=8Cusernam?= =?UTF-8?q?e=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/main.py b/backend/main.py index b521877..f70e706 100644 --- a/backend/main.py +++ b/backend/main.py @@ -682,7 +682,7 @@ def revoke_business(user_id: int, body: dict = None, user=Depends(require_role(" conn = get_db() conn.execute("UPDATE users SET business_verified = 0 WHERE id = ?", (user_id,)) reason = (body or {}).get("reason", "").strip() - target = conn.execute("SELECT role FROM users WHERE id = ?", (user_id,)).fetchone() + target = conn.execute("SELECT role, display_name, username FROM users WHERE id = ?", (user_id,)).fetchone() if target: msg = "你的商业用户资格已被取消。" if reason: