Commit Graph

5 Commits

Author SHA1 Message Date
Sisyphus
587a09774e fix(crawler): runGenericScript 支持 DB keywords, 跟 runPowerChina 对齐
【问题】
runGenericScript() 直接 execSync 没拼 --keyword, 导致 DB CrawlerConfig.keywords
对新矿/中核等 generic python 脚本完全失效. 之前 7 月份排查中电建入库少时确认过:
- 中电建: runPowerChina() 会逐 keyword 调用 → DB 关键词生效
- 新矿/中核: runGenericScript() 只调用一次不传 keyword → DB 关键词沦为摆设,
  新矿实际是全量抓"寻源公告", 入库量看起来正常但跟 DB 配置不一致

【修复】
照搬 runPowerChina() 的 keyword 循环+去重模式:
- 解析 config.keywords (JSON), 为空默认 ['']
- 逐个 keyword 调用 execSync, 失败继续下一个
- 用 seen Set 跨 keyword 去重
- 只处理 downloaded_at 是今天的记录 (避免历史重复入库)

【验证(生产)】
- 部署后 health 200 OK
- 手动跑 fetch-xkgroup.py --keyword 电缆/钢材/阀门/管材, 4 个全部 0 命中
  (新矿寻源公告确实没有电缆/钢材等关键词)
- 关键词确认生效, 新矿后续入库量会大幅下降 (按 DB 关键词配置真实反映)
2026-07-22 12:31:23 +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
3a72d6396c feat: 入库时写入 category 字段 + 导出 inferCategory + apiBase ?? 修复 2026-06-29 17:34:27 +08:00
Sisyphus
bd213eb5ec feat: 采集器地址提取优化 - 省份关键词匹配、标题兜底、跨天去重
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 16:24:32 +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