Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
momo 2023-11-02 15:58:15 +08:00
commit d9e854ca45

View File

@ -226,47 +226,41 @@ func ConsumeWebsocketStatData() {
if !ok {
continue
}
curCombineTotalCount += data.Num
//存在
stat, ok := statData.(mapUserWsStatItem)
if !ok {
logx.Error("断言mapUserWsStatItem错误")
continue
}
curCombineTotalCount += data.Num
stat.CurCombineCount += data.Num
if stat.CurCombineCount < 0 {
stat.CurCombineCount = 0
}
//保存统计
mapUserWsStat.Store(key, stat)
case TYPE_CUR_UNITY_HANDLE_COUNT: //unity处理计数
if !ok {
continue
}
curUnityHandleTotalCount += data.Num
//存在
stat, ok := statData.(mapUserWsStatItem)
if !ok {
logx.Error("断言mapUserWsStatItem错误")
continue
}
curUnityHandleTotalCount += data.Num
stat.CurUnityHandleCount += data.Num
if stat.CurUnityHandleCount < 0 {
stat.CurUnityHandleCount = 0
}
//保存统计
mapUserWsStat.Store(key, stat)
case TYPE_CUR_COMBINE_IMAGE_ERR_COUNT: //合图失败计数
if !ok {
continue
}
combineErrTotalCount += data.Num
//存在
stat, ok := statData.(mapUserWsStatItem)
if !ok {
logx.Error("断言mapUserWsStatItem错误")
continue
}
combineErrTotalCount += data.Num
stat.CombineErrCount += data.Num
//保存统计
mapUserWsStat.Store(key, stat)
@ -274,13 +268,13 @@ func ConsumeWebsocketStatData() {
if !ok {
continue
}
unityErrTotalCount += data.Num
//存在
stat, ok := statData.(mapUserWsStatItem)
if !ok {
logx.Error("断言mapUserWsStatItem错误")
continue
}
unityErrTotalCount += data.Num
stat.UnityErrCount += data.Num
//保存统计
mapUserWsStat.Store(key, stat)