ai_member_xiaoban/memory/2026-06-16.md
2026-06-17 08:00:01 +08:00

49 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-06-16 工作日志
## 陈逸鸫 - 细水入海 full_refresh v2 定稿
**来源:** 陈逸鸫(`ou_f981d4811369c954b3597908ca93a01c`
**核心变更6/16 定稿):**
### 1. 订单汇总列结构变更
- 从 A-X(24列) → A-W(23列):去掉原 W「有效成单」列订单号从 X 左移到 W
- V=渠道归属W=订单号
### 2. 线索只绑有效单
- `pick_valid_order()`: GSV>0 · 非全额退 · K≥C取最新一笔
- Y=1 时 K/L/X/N/O/P/Z 全写有效主单真实值
- 已退单不写旧 X/L
- 无有效单 → Y=0K/L/X 留空
### 3. 汇总 gate 全量覆盖(非 DB 扩行)
- 唯一真源 = 三表 Y=1 gate 的 unique X
- Step 4 + Step 5 同一 run共用 `pick_valid_order()` + `db_info`
- 汇总 W = 三表 Xgate 同源,不是 merge 再查 DB
- clear → gate 全量覆盖,不保留旧 W
- 同 X 多进线 → 只保留行号最小的 1 行
### 4. 分工定稿
- **Cursor**: 微伴/旧表同步 · 三键去重 · V/W 公式 · 验单 · 撞库消解
- **大麦**: full_refresh · 手机/UID/行课回填 · 订单汇总 merge · 完成后群回「full_refresh 完成」
- **小溪**: 不再参与 Bot 刷新
### 5. 验收标准
- gate X = 汇总 W当前 406=406
- 绑单审计 E1E9 全部 0
- 孤儿 X = 0
### 6. 脚本修改清单
- `bot_sales_step2_refresh.py`: DB 层改为逐单存储 + `pick_valid_order()` + Y≠1 不写 X
- `sales_leads_full_refresh.py`: 同上 + 汇总改为 gate 全量重建
- `refresh_order_summary.py`: A-W(23列) + 渠道分类改用 L 列
- 新增 `audit_lead_primary_order_bind.py`: 线索绑单审计脚本
### 7. 环境修复
- `secrets.env` 需要软链接: `ln -sf /root/.openclaw/workspace/secrets.env /root/.openclaw/workspace-xiaoban/secrets.env`
### 8. Skill 文档已更新
- `skills/full-data-refresh/SKILL.md` → v2 定稿,含 6 条核心架构规则
- 协作契约: `xhs-ark-dashboard/docs/bot-full-refresh-v2.md`
- 大麦侧主文档: `xhs-ark-dashboard/docs/damai-full-refresh-skill.md`