From 32e54187d2a815a66bbfc52d69b744d60ba26c1f Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Mon, 28 Aug 2023 18:34:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E7=BB=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/group_r/group_list.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/route/group_r/group_list.go b/route/group_r/group_list.go index 657b286..d7ac7ba 100644 --- a/route/group_r/group_list.go +++ b/route/group_r/group_list.go @@ -7,7 +7,6 @@ import ( "git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/mycontext" "git.hilo.cn/hilo-common/resource/mysql" - "git.hilo.cn/hilo-common/resource/redisCli" "git.hilo.cn/hilo-common/rpc" "git.hilo.cn/hilo-common/utils" "github.com/gin-gonic/gin" @@ -1490,7 +1489,7 @@ func GetGroupByCountryV2(c *gin.Context) (*mycontext.MyContext, error) { beginPos := int64(pageSize * (pageIndex - 1)) endPos := int64(pageSize*pageIndex - 1) key := rediskey.GetGroupCountrySortList(countryShortName) - zList, err := redisCli.GetRedis().ZRangeWithScores(context.Background(), key, beginPos, endPos).Result() + zList, err := model.RedisCluster.ZRangeWithScores(context.Background(), key, beginPos, endPos).Result() if err != nil { model.Log.Errorf("GetGroupByCountry err:%v", err) return myContext, err @@ -1509,7 +1508,7 @@ func GetGroupByCountryV2(c *gin.Context) (*mycontext.MyContext, error) { } hotGroupList = append(hotGroupList, gInfo) } - total, err := redisCli.GetRedis().ZCard(context.Background(), key).Uint64() + total, err := model.RedisCluster.ZCard(context.Background(), key).Uint64() if err != nil { model.Log.Errorf("GetGroupByCountry err:%v", err) return myContext, err -- 2.22.0