Commit d481605f authored by hujiebin's avatar hujiebin

feat:不再 写enter_room这个key

parent 9264dfbf
......@@ -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)
}
......
......@@ -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) {
......
......@@ -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,
......
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