From 43e77455b771accb2b4d2098c1e57e1b49094e29 Mon Sep 17 00:00:00 2001 From: "si@aidatagov.com" Date: Wed, 19 Nov 2025 01:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module_admin/service/metasecurity_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue-fastapi-backend/module_admin/service/metasecurity_service.py b/vue-fastapi-backend/module_admin/service/metasecurity_service.py index 6fe6078..e8bb90f 100644 --- a/vue-fastapi-backend/module_admin/service/metasecurity_service.py +++ b/vue-fastapi-backend/module_admin/service/metasecurity_service.py @@ -681,7 +681,7 @@ async def replace_table_with_subquery(ctrSqlDict, oldStrSql): "USER", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", } # 动态获取子查询 - if original_table in ctrSqlDict and alias_name not in sql_keywords: + if original_table in ctrSqlDict and alias_name and alias_name.upper().split()[0] not in sql_keywords: # 使用 ctrSqlDict 中的子查询替换表名 replaced = f"{keyword} ({ctrSqlDict[original_table]}) {alias_part}" else: