浅念
a290e39523
feat(customers): 发送/接收列改今日口径(对齐云客;本地消息表Asia/Shanghai今日聚合)
...
- CustomerOut 加 send_today/receive_today(路由赋值,非ORM列)
- /api/customers 每页一次 GROUP BY(owner IN 走复合索引前缀)
- 前端列优先今日值,无消息数据回退原raw字段;列名对齐云客「发送条数/接收条数」
- TDD:今日3发2收+昨日不计入+无消息客户0
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-22 14:39:17 +08:00
浅念
edca9b4c77
fix(customers): WA客户破1万上限(逐员工uid过滤,8585→11931全量)+双渠道页脚云客口径+消息同步刷新最近沟通时间
...
- wa-friends 逐员工抓取:全局查询~1万行硬上限(云客11931只翻到10000),
uid=员工WA号过滤(真机验证 declared 1145→1149),total-aware翻页
- declared-total 分渠道:Σ wechat/whatsapp_account.contacts_num(8590/11915)
- 消息增量同步顺带刷新 customer.last_chat_time(云客列表按最近沟通实时
排序,快照每日一次导致顺序滞后;微信1:1+WA都加)
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-20 14:04:06 +08:00
浅念
fd3cf0003b
feat(customers): 微信客户页脚改云客口径(Σ员工好友数声明值8590,用户选B方案)
...
- GET /api/customers/declared-total: Σ wechat_account.contacts_num
- 页脚优先显示云客口径(回退真实total);列表内容保持去重真实行
- 云客列表声明值含其ES索引重复doc(连行id都相同无法物理区分),仅对齐计数
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-20 13:44:39 +08:00
浅念
2d1943a74e
fix(api): 客户/群排序改回last_chat_time DESC(云客按最近沟通优先)
...
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-15 14:18:42 +08:00
浅念
854da6e566
fix(api): 客户/群列表排序改为friend_id/room_id ASC(对齐云客API自然顺序)
...
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-15 14:14:24 +08:00
浅念
1f89eeddb0
feat(api): /api/customers 加 friend_id 筛选(用于查单个客户昵称)
...
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-15 10:54:22 +08:00
浅念
fef176bd90
feat(api): customer filters user_id / add_time_since / last_chat_since
...
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-05 18:48:59 +08:00
浅念
1e0467b40f
feat: customer list API
...
Minimal read-only FastAPI surface over the mirrored DB:
- GET /api/customers with pagination (page/page_size) and optional
channel / owner_account_id / department_id filters, ordered by
last_chat_time desc (nulls last) then friend_id.
- GET /api/health liveness probe.
- Pydantic v2 CustomerOut + generic Page[T] envelope.
- CORS configured permissively for the local frontend.
- Tests override get_session to an in-memory async SQLite session
(StaticPool) and drive the app via httpx ASGITransport.
Co-Authored-By: Claude <noreply@anthropic.com >
2026-08-01 12:10:03 +08:00