feat: M9 日报结构化入库(HTML 改为写入 MySQL news_report/news_event,report_type=intl)

- 新增 report_db/ 包(models/schema/db,复用 news 项目实现,幂等 upsert)
- reporter.py: _build_report_data + generate_report 写库返回 report_id
- pipeline/cli 适配 report_id 返回值;HTML 渲染/上传保留 deprecated
- 新增 tests/test_report_db.py;.env.example 增加 NEWS_DB_* 配置
- 已部署 pi5 并验证:真实生成 report_id=184(12 事件)+ 幂等覆盖
This commit is contained in:
2026-08-04 11:09:17 +08:00
parent e1ec5f836d
commit d4a55bcaaa
14 changed files with 669 additions and 69 deletions
+8
View File
@@ -19,3 +19,11 @@ DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/api/v1/services/embeddings/tex
# --- Qdrant ---
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=
# --- 日报结构化入库(与 news 项目共用 MySQL myquant 库) ---
# pi5 通过内网直连 pi(192.168.1.10) 上的 autossh 隧道(0.0.0.0:13306 → doorcome.cn:3306
NEWS_DB_HOST=192.168.1.10
NEWS_DB_PORT=13306
NEWS_DB_USER=myquant
NEWS_DB_PASSWORD= # 填真实值(与 news 项目 .env 的 NEWS_DB_PASSWORD 相同),禁止写入源码
NEWS_DB_NAME=myquant