diff --git a/server/websocket/internal/logic/ws_statistics.go b/server/websocket/internal/logic/ws_statistics.go index d408e488..76eba02d 100644 --- a/server/websocket/internal/logic/ws_statistics.go +++ b/server/websocket/internal/logic/ws_statistics.go @@ -226,13 +226,13 @@ 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 //保存统计 mapUserWsStat.Store(key, stat) @@ -240,13 +240,13 @@ func ConsumeWebsocketStatData() { if !ok { continue } - curUnityHandleTotalCount += data.Num //存在 stat, ok := statData.(mapUserWsStatItem) if !ok { logx.Error("断言mapUserWsStatItem错误") continue } + curUnityHandleTotalCount += data.Num stat.CurUnityHandleCount += data.Num //保存统计 mapUserWsStat.Store(key, stat) @@ -254,13 +254,13 @@ func ConsumeWebsocketStatData() { 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) @@ -268,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)