docs: 文档重构 — 清理 AI agent 残留,整合 docs/ 目录结构
- 删除 11 个残留文件: continuation.md, init_plan.md, reasonix.toml, djapi/continuation.md, djapi/.serena/, djapi/.claude/, djapi/.mcp.json, .claude/skills/, docs/usage.html, docs/db_schema.md, docs/report_db_design.md - 7 个 CLAUDE-*.md 移入 docs/ 并重命名去 CLAUDE- 前缀 - 新增 4 个文档: architecture.md, development.md, api.md, deployment.md - 重写 usage.md, README.md - 修复所有过时引用和交叉链接
This commit is contained in:
+35
-13
@@ -1,7 +1,7 @@
|
||||
# 日报查询 API 使用手册(news_report / news_event)
|
||||
|
||||
> 版本:v1.1 | 2026-08-03(已部署至生产 `api.doorcome.cn`)
|
||||
> 数据表定义见 `djapi/docs/db_schema.md`,数据生产侧设计见 `djapi/docs/report_db_design.md`。
|
||||
> 数据表定义见 [db_schema_v1.1.md](db_schema_v1.1.md)。
|
||||
> 本文档为前端/调用方对接手册:两个只读查询接口的线上地址、参数、curl 用法与返回结构。
|
||||
|
||||
---
|
||||
@@ -61,11 +61,22 @@ Swagger 交互式文档(自动生成,含全部参数说明):`https://api
|
||||
"generated_at": "2026-08-03T07:00:00",
|
||||
"ai_summary": "……(AI 摘要全文,按条目分行)",
|
||||
"stats": {
|
||||
"pipeline": { "M1": 210, "M2": 205, "M3": 198, "M4": 190, "M5": 188, "M6": 180 },
|
||||
"sources": { "cls": 95, "eastmoney": 60, "other": 25 },
|
||||
"news": { "total": 180, "hi_threshold": 18, "sentiments": {...}, "importances": [...], "event_types": [...] },
|
||||
"cninfo": { "total": 58, "hi_threshold": 4, "by_day": {...}, "announcement": 40, "research": 15, "irm": 3 },
|
||||
"xwlb": { "total": 28, "date": "2026-08-03" }
|
||||
"pipeline": {
|
||||
"raw_total": 116,
|
||||
"raw_total_24h": 116,
|
||||
"raw_by_source": { "经济观察网": 31, "新浪财经": 27, "证券时报": 28, "财联社": 15, "东方财富": 7, "中证券网": 2, "第一财经": 3, "中国证券网": 3 },
|
||||
"raw_by_source_24h": { ... },
|
||||
"proc": ..., "deduped": ..., "dups": ..., "emb_count": ..., "qdrant_count": ..., "cninfo_raw": ...
|
||||
},
|
||||
"news": {
|
||||
"total": 643,
|
||||
"hi_threshold": 4,
|
||||
"sentiments": { "neutral": 470, "positive": 123, "negative": 50 },
|
||||
"importances": { "1": 115, "2": 275, "3": 185, "4": 48, "5": 20 },
|
||||
"event_types": { "其他": 287, "国际局势": 107, "宏观政策": 62, "行业政策": 49, "财报披露": 29 }
|
||||
},
|
||||
"cninfo": { "total": 48, "hi_threshold": 2, "by_day": { "2026-08-06": 8, "2026-08-01": 9 }, "announcement": 47, "research": 1, "irm": 0 },
|
||||
"xwlb": { "total": 21, "date": "08月05日" }
|
||||
},
|
||||
"created_at": "2026-08-03T07:01:00"
|
||||
},
|
||||
@@ -77,18 +88,26 @@ Swagger 交互式文档(自动生成,含全部参数说明):`https://api
|
||||
"generated_at": "2026-08-03T07:00:00",
|
||||
"ai_summary": "……",
|
||||
"stats": {
|
||||
"pipeline": { "M1": 150, "M2": 145, "M3": 140, "M4": 135, "M5": 130, "M6": 125 },
|
||||
"sentiment": [...],
|
||||
"importance": [{ "重要度": 5, "数量": 3 }, { "重要度": 4, "数量": 12 }],
|
||||
"event_types": [{ "事件类型": "地缘政治", "数量": 8 }],
|
||||
"source_dist": [{ "来源": "investinglive.com", "文章数": 45 }]
|
||||
"pipeline": { "raw_total": 442, "processed": 442, "deduped": 111, "embedded": 112, "qdrant": 2952 },
|
||||
"importance": [
|
||||
{ "importance": 2, "count": 2 }, { "importance": 3, "count": 31 },
|
||||
{ "importance": 4, "count": 26 }, { "importance": 5, "count": 5 }
|
||||
],
|
||||
"event_types": [
|
||||
{ "event_type": "宏观经济", "count": 15 }, { "event_type": "地缘政治", "count": 12 },
|
||||
{ "event_type": "财报披露", "count": 9 }, { "event_type": "央行决议", "count": 7 }
|
||||
],
|
||||
"source_dist": [
|
||||
{ "source": "InvestingLive", "count": 30 }, { "source": "MarketWatch", "count": 3 },
|
||||
{ "source": "CNBC", "count": 3 }, { "source": "Yahoo Finance", "count": 1 }
|
||||
]
|
||||
},
|
||||
"created_at": "2026-08-03T07:01:00"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
> `stats` 为 JSON 快照:finance 含 `pipeline/sources/news/cninfo/xwlb`,intl 含 `pipeline/sentiment/importance/event_types/source_dist`。前端按 key 防御性读取(见 db_schema.md §3)。
|
||||
> `stats` 为 JSON 快照(示例为 2026-08-06 真实数据):finance 含 `pipeline/news/cninfo/xwlb`,intl 含 `pipeline/importance/event_types/source_dist`(另有 `sentiment`)。finance 与 intl 的 pipeline 内部 key 集**不同**(finance: `raw_total/raw_by_source/proc/dups/...`;intl: `raw_total/processed/deduped/embedded/qdrant`),前端按 key 防御性读取;各数字口径(`raw_total` ≠ `news.total` 等)见 `db_schema_v1.1.md` §3.1。
|
||||
|
||||
**传 `id`** → 单份详情(对象),增加 `events` 数组(按 `section, rank` 排序)。真实返回(id=182,58 条事件):
|
||||
|
||||
@@ -179,12 +198,15 @@ curl 'https://api.doorcome.cn/api/news/reports/?id=182'
|
||||
"title": "特朗普称已取消对伊朗的袭击计划,因双方就协议框架达成一致",
|
||||
"summary": "……",
|
||||
"sentiment": "neutral",
|
||||
"source": "investinglive.com",
|
||||
"source": "InvestingLive",
|
||||
"sources": ["InvestingLive"],
|
||||
"url": "https://www.investing.com/..."
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
> `sources` 为该新闻的**全部来源**(JSON 数组,字符串列表);`source` 为主来源(单值)。多源事件(如同一新闻被多家媒体转载)时 `sources` 含多个元素;历史事件可能为 `null`。
|
||||
|
||||
### curl 示例
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user