F002 平台助手 (NestJS + Next.js + Prisma + SQLite)
- Lead 模型加 3 字段: notes (5000 字) / notesExtractedAt / notesSource
- 新增 NotesExtractorService (crawler 模块): PDF/HTML/URL → text → DeepSeek → 6 条要点
- 新增 LeadNotesController: POST /api/lead-notes/extract/:leadId (24h 缓存 + forceRefresh)
- lead.service.ts publishToDirev 优先用 notes 填 publishArgs.description + 同步传 notes
- Java publish() 已有逻辑: notes 优先 → description, 不需要改
- 端到端验证: Lead.notes=6 条要点 → publishToDirev → B2B tb_inquiry.note 正确落地
依赖: pdf-parse (新加, 1 个 npm 包, 25KB)
API 端点:
- POST /api/lead-notes/extract/:leadId?sourcePath=<URL|路径>&forceRefresh=false
- 返 { notes: string, source: 'pdf'|'html'|'url', cached: boolean }
环境变量: DEEPSEEK_API_KEY (从 .env 读, 缺时报错)
关联: F002-W31-交接文档.md §4 P1
本地备份: ~/projects/_meta/f002-fix/w31-platform-assistant-2026-06-23/
|
||
|---|---|---|
| apps | ||
| docs | ||
| packages/shared | ||
| scripts | ||
| .gitignore | ||
| .prettierrc | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| image_001.jpg | ||
| package-lock.json | ||
| package.json | ||
| 线索管理操作白皮书.html | ||