From fe86662285723d5f9d11746fb70d5cb8c88fe622 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Fri, 25 Aug 2023 12:13:19 +0800 Subject: [PATCH] Fix/group support --- domain/service/group_s/group_support.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domain/service/group_s/group_support.go b/domain/service/group_s/group_support.go index 5a5f375..975b4b8 100644 --- a/domain/service/group_s/group_support.go +++ b/domain/service/group_s/group_support.go @@ -225,14 +225,14 @@ func GetGroupConsumeCount(model *domain.Model, imGroupId, period string) (uint64 // 流水 keyDiamond := rediskey.GetGroupSupportConsumeSummary(period) consume, err := model.RedisCluster.ZScore(context.Background(), keyDiamond, imGroupId).Result() - if err != nil { + if err != nil && err != redis.Nil { model.Log.Errorf("GetSupportLevelByRedis key:%v, groupId:%v, err:%v", keyDiamond, imGroupId, err) return 0, 0, err } // 支持者数量 keySupportNum := rediskey.GetGroupSupportCountSupporter(period, imGroupId) count, err := model.RedisCluster.SCard(context.Background(), keySupportNum).Result() - if err != nil { + if err != nil && err != redis.Nil { model.Log.Errorf("GetSupportLevelByRedis key:%v, groupId:%v, err:%v", keySupportNum, imGroupId, err) return 0, 0, err } -- 2.22.0