chore: 优化部分代码

This commit is contained in:
2024-12-18 20:24:34 +08:00
parent b51936445d
commit a90a32cce1
2 changed files with 4 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ public class OnlineUserServiceImpl implements OnlineUserService {
})
.map(tokenKey -> StrUtil.subAfter(tokenKey, StringConstants.COLON, true))
.collect(Collectors.groupingBy(token -> Convert.toLong(StpUtil.getLoginIdByToken(token))));
// 过滤 Token
// 筛选数据
for (Map.Entry<Long, List<String>> entry : tokenMap.entrySet()) {
Long userId = entry.getKey();
UserContext userContext = UserContextHolder.getContext(userId);