rootandClaude Opus 5 22def0b5cb 修复代理渠道统计累加子节点时未区分 appId
AccumulateChildNodes 把子代理数据累加到上级代理时,匹配条件只比了 SumDate,
没有比 AppId。上级节点的 Stats 在同一 SumDate 下每个 app 各有一条,子代理
某个 app 的数据会被累加进上级的全部 app 条目,且命中后不 break,会继续累加
进后续所有匹配项。

触发条件: GetAllAgentStatDict 对 appId 是可选过滤,而 AgentChannelStatSearch
的 AppId 为 *int32 且无 binding:required。请求不传 appId 时 statDict 跨
全部 app,此时必然多加。影响 /api/stat/agent/channel/stat,是代理商侧看到的
数据。

同函数下方的 lostStat 分支本就带 AppId: childStat.AppId,说明 appId 本是
预期维度,匹配处属遗漏。

本次只加 appId 比较,未加 break。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-02 09:54:33 +08:00
2026-09-27 08:53:36 +08:00
2026-05-20 16:13:58 +08:00
2026-05-26 15:57:55 +08:00
2026-05-20 16:13:58 +08:00
2026-06-03 23:13:12 +08:00
2026-05-20 16:13:58 +08:00
2026-05-20 16:13:58 +08:00
2026-05-20 16:13:58 +08:00
2026-05-20 16:13:58 +08:00
2026-05-20 16:13:58 +08:00
2026-05-20 16:13:58 +08:00

渠道统计 后台服务

安装swag

go install github.com/swaggo/swag/cmd/swag@latest

Swagger文档生成

swag init --parseDependency

依赖

  1. kafka 主要用作消息队列
  2. redis 实时数据统计

发布

使用一下参数,本地生成mv-app-server.zip压缩包。包换app、配置文件和加密key。

$ sudo make deploy

路径

知乎: /server/zhihu/stat-center/conf

逼哩: /server/bili/stat-center/conf

麻豆: /server/stat-center/conf

S
Description
No description provided
Readme
26 MiB
Languages
Go 99.3%
Python 0.5%
Lua 0.1%