【7.1.2】修复在线用户列表的获取

pull/22/head
fengshuonan 2021-08-24 16:11:29 +08:00
parent d16c3674a5
commit 3549dd58c6
1 changed files with 5 additions and 2 deletions

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.auth.session;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.stylefeng.roses.kernel.auth.api.SessionManagerApi;
import cn.stylefeng.roses.kernel.auth.api.cookie.SessionCookieCreator;
@ -207,8 +208,10 @@ public class DefaultSessionManager implements SessionManagerApi {
for (Map.Entry<String, LoginUser> userEntry : allKeyValues.entrySet()) {
String token = userEntry.getKey();
LoginUser loginUser = userEntry.getValue();
loginUser.setToken(token);
loginUsers.add(loginUser);
LoginUser tempUser = new LoginUser();
BeanUtil.copyProperties(loginUser, tempUser);
tempUser.setToken(token);
loginUsers.add(tempUser);
}
return loginUsers;