Commit fa6cfda8 authored by JiebinHu's avatar JiebinHu

group_room_living

parent 484f4349
......@@ -4,7 +4,6 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mylogrus"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/redisCli"
"hilo-user/_const/redis_key/group_k"
"hilo-user/myerr"
"strconv"
......@@ -26,7 +25,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
return nil, myerr.WrapErr(err)
}
groupUserIdstrs, err := redisCli.GetRedis().ZRange(model, key, 0, -1).Result()
groupUserIdstrs, err := model.RedisCluster.ZRange(model, key, 0, -1).Result()
if err != nil {
return nil, myerr.WrapErr(err)
}
......@@ -34,7 +33,6 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
resultUserSet := map[mysql.ID]string{}
for i, _ := range groupUserIdstrs {
tempGroupUid, userId := analysisMemberStr(groupUserIdstrs[i])
mylogrus.MyLog.Debugf("RoomLivingUserIdFilter, analysisMemberStr %s, %d", tempGroupUid, userId)
if _, flag := userIdSet[userId]; flag {
resultUserSet[userId] = tempGroupUid
......@@ -44,7 +42,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
}
func ClearExpired(model *domain.Model, key string, expireSec int64) error {
return model.Redis.ZRemRangeByScore(model, key,
return model.RedisCluster.ZRemRangeByScore(model, key,
"0", strconv.FormatInt(time.Now().Unix()-expireSec, 10)).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