fix
This commit is contained in:
parent
528af06922
commit
21f06c6e39
|
@ -114,13 +114,17 @@ func ConsumeWebsocketStatData(ctx context.Context) {
|
||||||
}
|
}
|
||||||
case TYPE_COMBINE_IMAGE_REQUEST_COUNT: //请求算法合图计数
|
case TYPE_COMBINE_IMAGE_REQUEST_COUNT: //请求算法合图计数
|
||||||
statData, ok := mapUserWsStat.Load(key)
|
statData, ok := mapUserWsStat.Load(key)
|
||||||
|
//不存在
|
||||||
if !ok {
|
if !ok {
|
||||||
if data.Value > 0 {
|
//数据是减少的
|
||||||
|
if data.Value <= 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
mapUserWsStat.Store(key, mapUserWsStatItem{
|
mapUserWsStat.Store(key, mapUserWsStatItem{
|
||||||
CurCombineCount: data.Value,
|
CurCombineCount: data.Value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
//存在
|
||||||
if stat, ok := statData.(mapUserWsStatItem); ok {
|
if stat, ok := statData.(mapUserWsStatItem); ok {
|
||||||
stat.CurCombineCount += data.Value
|
stat.CurCombineCount += data.Value
|
||||||
if stat.CurCombineCount < 0 {
|
if stat.CurCombineCount < 0 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user