@@ -242,8 +242,8 @@ class OAuthService:
# 从数据库查找授权码
cursor.execute("""
SELECT user_id, app_id, redirect_uri, expires_at, used
- FROM t_oauth_authorization_codes AND is_deleted = 0
- WHERE code = %s
+ FROM t_oauth_authorization_codes
+ WHERE code = %s AND is_deleted = 0
""", (code,))
auth_code = cursor.fetchone()