Commit Graph

4 Commits

Author SHA1 Message Date
Sisyphus
1dfe5ede67 fix(crawler): 修复 cron 表达式工作日限制(1-5),改为每天执行
- 生产 DB: 中电建 0 8 * * 1-5 → 0 8 * * * (每天早8点,含周末)
- 生产 DB: 新矿 5 8 * * 1-5 → 5 8 * * * (每天早8:05,含周末)
- 生产 DB: 重激活新矿采集器(paused→active)
- seed.ts: 同步修正, 避免未来 db:init 再次写入 1-5
- PM2 已重启使新 cron 生效

说明: 1-5 = 周一至周五, 去掉后变为每天执行。
用户可在前端「采集器配置」下拉框自由切换:
  每4小时 / 每6小时 / 每天早8点/晚7点 / 手动
2026-07-16 16:31:42 +08:00
Sisyphus
58ac140802 feat: 品类方案C - AI分类 + 关键词表反哺
- 新增 ProductCategory 表(schema + migration + seed 15个品类)
- 新增 product-category CRUD API(GET/POST/PUT/DELETE /api/categories)
- 新增 CategoryInferenceService:关键词匹配优先,失败时调 DeepSeek AI 分类,结果反写品类表
- 更新 CrawlerService:采集入库时使用 batchInfer 替代硬编码 inferCategory
- 更新 LeadService:品类筛选改为 DB 关键词匹配,移除硬编码 CATEGORY_KEYWORDS
- 修复 LeadModule/CrawlerModule 依赖关系,避免循环依赖
2026-06-30 18:37:23 +08:00
Sisyphus
4ab0040e55 feat(F002-P1): Lead 加 notes 字段 + crawler 提取 PDF 6 条要点 (老 GUI 同款)
- 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/
2026-06-24 11:52:59 +08:00
Sisyphus
afac18e843 feat(F002): W26 + W29.x + W30 + W31 平台助手全部改动首次 commit
- W26: NestJS API + Next.js Web + Prisma + SQLite scaffold
- W26: Lead 模型 + Crawler + 询价发布助手 (线索池 + 一键发布)
- W29.x: MCP 集成 (Integration 模型 + connectMcp + publish_rfq 5 工具端到端跑通)
- W30: 3 字段补充 (notes / quotationType / quotationDemand)
- W31 P1: 自动填 enterpriseId / userId (Prisma companyUserId 字段 + get_app_identity tool + lead.service.ts publishArgs)
- W31: detail 详情页 + admin UI 集成管理 (OpenAppListView + AuditLogListView)

关联: ~/Documents/02-平台开发/产品开发/F002-W31-交接文档.md
GIT-AUDIT-REPORT-2026-06-24.md
2026-06-24 11:07:11 +08:00