Commit a29fdf93 authored by JiebinHu's avatar JiebinHu

hgetall 改成mget

parent c1cf069e
......@@ -121,6 +121,7 @@ func clearRoomVisit(groupId string, t time.Time) (int64, error) {
return ret, nil
}
// Deprecated: hgetall有问题
func GetAllRoomVisitCount() (map[string]string, error) {
key := redis_key.GetPrefixRoomVisitCount()
return redisCli.GetRedis().HGetAll(context.Background(), key).Result()
......
......@@ -1467,8 +1467,13 @@ func getCandidatesByCountry(model *domain.Model, bannedGroups map[string]uint64,
if err != nil {
return nil, 0, nil, err
}
var groupIds []string
for _, v := range noPwdGroups {
groupIds = append(groupIds, v.ImGroupId) // imGroupId
}
roomVisitCount, err := room_c.GetAllRoomVisitCount()
//roomVisitCount, err := room_c.GetAllRoomVisitCount()
roomVisitCount, err := room_c.MGetRoomVisitCount(groupIds)
if err != nil {
return nil, 0, nil, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment