Table of Contents
15.10 偶像端群发消息已读统计【未授权拦截通过,待登录态联调】
GET /tieup/api/v1/artist/broadcast-messages/{message_no}/read-stats
路径参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
message_no |
string | 是 | 群发消息编号,必须属于当前偶像 |
鉴权:需要 Authorization: Bearer <access_token>,当前账号必须已开通偶像端。
响应字段:
| 字段 | 类型 | 说明 |
|---|---|---|
message_no |
string | 群发消息编号 |
task_no |
string/null | 群发任务编号 |
target_count |
integer | 发送目标粉丝数,来自发送时有效订阅粉丝快照 |
read_count |
integer | 展示已读数,取 MySQL 聚合已读数和 Redis 实时已读数的较大值,并以 target_count 封顶 |
read_rate |
number | 已读率小数,计算口径为 read_count / target_count,保留四位小数 |
read_rate_percent |
string | 已读率百分比,计算口径为 (read_count / target_count) * 100,固定两位小数 |
persisted_read_count |
integer | MySQL 聚合已读数,来自 tieup_im_message_stat / tieup_artist_broadcast_task |
realtime_read_count |
integer | Redis 实时已读数,来自 tieup:im:broadcast:read:{message_no} |
stat_status |
string | 统计状态:realtime=Redis 实时数高于 MySQL 聚合,persisted=MySQL 聚合已追平或更高 |
响应示例:
{
"code": 200,
"message": "成功",
"data": {
"message_no": "MSG202607030003",
"task_no": "BCT202607030001",
"target_count": 1200,
"read_count": 1000,
"read_rate": 0.8333,
"read_rate_percent": "83.33",
"persisted_read_count": 100,
"realtime_read_count": 1000,
"stat_status": "realtime"
}
}
说明:Redis 实时数用于艺人端查看统计时降低体感延迟;MySQL 已读明细表 tieup_im_broadcast_read_receipt 是最终事实源,队列和定时对账会持续修正聚合字段。