接口优化
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user