diff --git a/_const/redis_key/redisPrefix.go b/_const/redis_key/redisPrefix.go index d0f8b1cee02a731123d9a847ae4572b6c3d51572..8734c3ad3b47041f7511df912050a8a826cf2bc6 100644 --- a/_const/redis_key/redisPrefix.go +++ b/_const/redis_key/redisPrefix.go @@ -766,6 +766,8 @@ func GetPrefixGroupInUserDuration(groupUuid string) string { return strings.Replace(groupInUserDuration, "{groupUuid}", groupUuid, -1) } +// Deprecated: 用户进房时间 +// 可用 uer:u:${user_id}代替 func GetUserEnterRoomKey(userId uint64) string { return strings.Replace(userEnterRoom, "{userId}", strconv.FormatUint(userId, 10), -1) } diff --git a/domain/cache/room_c/userRoomVisit.go b/domain/cache/room_c/userRoomVisit.go index f257d46d3c2d6ab05cc00650e23abdff76b351be..b2bf2cfd3950d0603f82f0c6455f8db2515ef988 100644 --- a/domain/cache/room_c/userRoomVisit.go +++ b/domain/cache/room_c/userRoomVisit.go @@ -6,7 +6,6 @@ import ( "git.hilo.cn/hilo-common/mylogrus" "git.hilo.cn/hilo-common/resource/config" "git.hilo.cn/hilo-common/resource/redisCli" - "github.com/bluele/gcache" redis2 "github.com/go-redis/redis/v8" "github.com/spf13/cast" "hilo-group/_const/redis_key" @@ -78,8 +77,6 @@ func GetUserRoomVisit(userId uint64) (map[string]int64, error) { return result, nil } -var roomVisitCntCache = gcache.New(50000).LRU().Build() - // 批量获取房间访问人数 // 带上lru func MGetRoomVisitCount(groupIds []string) (map[string]string, error) { diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index c5ef5f0bee8e1a354e29746da67b7737f6504124..bd846b88de1a4c34925bde21da074e6520a18232 100644 --- a/route/group_r/group_op.go +++ b/route/group_r/group_op.go @@ -1871,9 +1871,9 @@ func GroupIn(c *gin.Context) (*mycontext.MyContext, error) { myContext.Log.Infof("GroupIn, ProcessRoomVisit err: %s", err.Error()) } // 更新用户进入房间缓存记录 - if err = room_c.ProcessUserRoomVisit(userId, groupId); err != nil { - myContext.Log.Infof("GroupIn, ProcessUserRoomVisit err: %s", err.Error()) - } + //if err = room_c.ProcessUserRoomVisit(userId, groupId); err != nil { + // myContext.Log.Infof("GroupIn, ProcessUserRoomVisit err: %s", err.Error()) + //} resp.ResponseOk(c, group_cv.GroupChannelId{ ChannelId: channelId, Token: token,