Browse Source

代码提交

master
si@aidatagov.com 3 days ago
parent
commit
43e77455b7
  1. 2
      vue-fastapi-backend/module_admin/service/metasecurity_service.py

2
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:

Loading…
Cancel
Save