From 5a04f6b5d7831f3a461721947e3d5907e85c1097 Mon Sep 17 00:00:00 2001 From: iamhujiebin <458249864@qq.com> Date: Mon, 28 Aug 2023 01:51:15 +0800 Subject: [PATCH] Revert "1" This reverts commit 0500449b426a5d1e3e832c5640b25cac8d3dd5d9. --- domain/cache/res_c/country.go | 4 ++-- domain/model/group_m/mic.go | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/domain/cache/res_c/country.go b/domain/cache/res_c/country.go index 37c2ac6..3e5744d 100644 --- a/domain/cache/res_c/country.go +++ b/domain/cache/res_c/country.go @@ -18,7 +18,7 @@ func GetCountryIconMap(model *domain.Model) (map[string]string, error) { if len(m) <= 0 { return map[string]string{}, nil } - //SaveAllCountryIcon(model, m) + SaveAllCountryIcon(model, m) } return m, nil } @@ -47,7 +47,7 @@ func GetCountryAreaMap(model *domain.Model) (map[string]string, error) { if len(m) <= 0 { return map[string]string{}, nil } - //SaveAllCountryArea(model, m) + SaveAllCountryArea(model, m) } return m, nil } diff --git a/domain/model/group_m/mic.go b/domain/model/group_m/mic.go index 30ddde2..ef72129 100644 --- a/domain/model/group_m/mic.go +++ b/domain/model/group_m/mic.go @@ -876,8 +876,6 @@ var micGroupNumCache = gcache.New(10000).LRU().Build() // 获取麦上有人的群组&&麦上的人数 // 带lru缓存,1min func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) { - m := make(map[string]int64) - return m, nil // get from cache if data, err := micGroupNumCache.Get(micGroupNumKey); err == nil { //model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data) @@ -893,6 +891,12 @@ func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) { if err != nil { return nil, myerr.WrapErr(err) } + // todo 临时处理 + m := make(map[string]int64) + for _, v := range groupUuids { + m[v] = 10 + } + return m, nil // resultGroupUuids := make(map[string]int64, len(groupUuids)) //循环lua判断是否, 最后的保证,(猜想:真正麦上有人的群没有很多) -- 2.22.0