新增公司资料/指数/重大事项等 13 个接口, 文档全面对齐

- 新增 fin_mda/fin_equity/fin_company/fin_belong_index/fin_major_events 5 个模块
- 覆盖: 管理层讨论、股本结构、公司介绍、所属行业、指数分类/统计/成分、并购/股权激励/诉讼/关联交易/违规/担保
- _emchoice.fetch_report 支持"数据为空"按空结果处理
- api.py 增加 _simple_endpoint 统一生成纯 stocks 参数接口, 路由达 29 个 /fin 端点
- 冒烟测试扩展至 56 用例, 全部通过
- api_manual/blueprint/SKILLS/待优化 文档与代码路径 100% 对齐
This commit is contained in:
2026-08-15 11:34:11 +08:00
parent 797369bbed
commit 2ce68b7b5d
13 changed files with 1147 additions and 11 deletions
+4
View File
@@ -34,5 +34,9 @@ def fetch_report(url_or_params: str | dict[str, str]) -> list[dict]:
r.raise_for_status()
payload = r.json()
if not payload.get("success"):
# 上游明确提示"数据为空"时按空结果处理 (如某股无股权激励/担保记录), 其余视为失败
message = str(payload.get("message") or "")
if any(keyword in message for keyword in ("返回数据为空", "暂无数据", "无数据")):
return []
raise RuntimeError(f"接口返回失败: {payload}")
return payload.get("result", {}).get("data") or []