|
@@ -234,11 +234,8 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
|
|
|
// 直播房间配置信息
|
|
|
String userSig = "";
|
|
|
try {
|
|
|
- // 游客IM聊天ID
|
|
|
- String imUserId = MessageFormat.format("VISITOR_{0}", userInfo.getUserId());
|
|
|
-
|
|
|
// 生成聊天签名
|
|
|
- userSig = pluginService.register(imUserId, userInfo.getUserName(), userInfo.getAvatar());
|
|
|
+ userSig = pluginService.register(userInfo.getUserId().toString(), userInfo.getUserName(), userInfo.getAvatar());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error("直播房间游客注册失败: userId={}", userInfo.getUserId(), e);
|
|
@@ -1608,7 +1605,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
|
|
|
|
|
|
String today = DateTime.now().toString("yyMMdd");
|
|
|
// 用户Id缓存key
|
|
|
- String userIdKey = MessageFormat.format("fingerprint:userId:{1}", today);
|
|
|
+ String userIdKey = MessageFormat.format("fingerprint:userId:{0}", today);
|
|
|
|
|
|
RAtomicLong atomicLong = redissonClient.getAtomicLong(userIdKey);
|
|
|
if (!atomicLong.isExists()) {
|
|
@@ -1621,7 +1618,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
|
|
|
// 生成游客用户ID
|
|
|
userId = (int) atomicLong.getAndIncrement();
|
|
|
// 设置用户ID缓存
|
|
|
- bucket.set(userId + Integer.parseInt(today), 12L, TimeUnit.HOURS);
|
|
|
+ bucket.set(userId, 12L, TimeUnit.HOURS);
|
|
|
}
|
|
|
|
|
|
//房间累计用户信息-指只要进入到该房间的用户都要记录
|