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>
This commit is contained in:
浅念
2026-08-22 14:39:17 +08:00
parent 00ae13b5c2
commit a290e39523
5 changed files with 88 additions and 5 deletions
+4 -4
View File
@@ -450,11 +450,11 @@ onMounted(() => {
<el-table-column label="好友标签" min-width="120">
<template #default="{ row }">{{ contactLabelsText(row) }}</template>
</el-table-column>
<el-table-column label="发送消息数" width="100" align="right">
<template #default="{ row }">{{ cellNum(row, 'sendNum') }}</template>
<el-table-column label="发送条数" width="100" align="right">
<template #default="{ row }">{{ row.send_today ?? cellNum(row, 'sendNum') }}</template>
</el-table-column>
<el-table-column label="接收消息数" width="100" align="right">
<template #default="{ row }">{{ cellNum(row, 'receiveNum') }}</template>
<el-table-column label="接收条数" width="100" align="right">
<template #default="{ row }">{{ row.receive_today ?? cellNum(row, 'receiveNum') }}</template>
</el-table-column>
<el-table-column label="最近联系时间" width="170">
<template #default="{ row }">{{ cellTimeText(row, 'lastChatTime') }}</template>