fix: MySQL 类型兼容性修复

- 添加 _parse_datetime, _parse_date, _parse_time 辅助函数
- 处理 MySQL 返回原生 datetime/date/time 类型而非字符串的情况
- 修改默认绑定地址为 0.0.0.0 以支持局域网访问

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 18:36:02 +08:00
parent 5860dccd60
commit 733d737413
2 changed files with 41 additions and 14 deletions

View File

@@ -8697,7 +8697,7 @@ def _export_report_file(report, format: str, prefix: str, exporter):
)
def run_server(host: str = "127.0.0.1", port: int = 8080):
def run_server(host: str = "0.0.0.0", port: int = 8080):
"""启动 Web 服务器"""
import uvicorn
uvicorn.run(app, host=host, port=port)