接口优化

This commit is contained in:
lhx
2025-09-27 09:30:46 +08:00
parent 52d2753824
commit 0b1e9851dd
7 changed files with 368 additions and 384 deletions

View File

@@ -192,9 +192,17 @@ class DatabaseService:
try:
inspector = inspect(engine)
# 排除mysql的系统表和accounts表
return [table for table in inspector.get_table_names() if not table.startswith('mysql') and table != 'accounts']
data = [table for table in inspector.get_table_names() if not table.startswith('mysql') and table != 'accounts' and table != 'apscheduler_jobs']
return {
"success": True,
"message": "获取表名成功",
"data": data
}
except Exception as e:
return []
return {
"success": False,
"message": f"获取表名失败: {str(e)}"
}
@staticmethod
def import_file_to_database(db: Session, filename: str, file_content: str,