Przeglądaj źródła

Merge branch 'feature/0803-im'

liujc 1 rok temu
rodzic
commit
6a3a0a33c3

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java

@@ -2161,6 +2161,9 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         Optional.ofNullable(roomUid).orElseThrow(() -> new BizException("房间编号不能为空!"));
         Optional.ofNullable(userId).orElseThrow(() -> new BizException("人员编号不能为空!"));
 
+        // 设置进入时间
+        RBucket<Long> userStateTimeCache = redissonClient.getBucket(LIVE_USER_LAST_TIME.replace(USER_ID, userId.toString()));
+        userStateTimeCache.set(new Date().getTime(), 60L, TimeUnit.MINUTES);
         LiveRoomWrapper.LiveRoomVo liveRoomVo = queryRoomInfo(roomUid);
 
         //记录用户当前房间uid