forked from all_user/stat_center
22def0b5cb3c7e8227b675df19e532d572620238
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>
渠道统计 后台服务
安装swag
go install github.com/swaggo/swag/cmd/swag@latest
Swagger文档生成
swag init --parseDependency
依赖
- kafka 主要用作消息队列
- redis 实时数据统计
发布
使用一下参数,本地生成mv-app-server.zip压缩包。包换app、配置文件和加密key。
$ sudo make deploy
路径
知乎: /server/zhihu/stat-center/conf
逼哩: /server/bili/stat-center/conf
麻豆: /server/stat-center/conf
Languages
Go
99.3%
Python
0.5%
Lua
0.1%