Commit 32e54187 authored by chenweijian's avatar chenweijian

群组优化

parent 55d3750e
......@@ -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
......
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