mirror of https://gitee.com/y_project/RuoYi.git
commit
90131d1338
|
@ -78,6 +78,7 @@ public class SysUserOnlineController extends BaseController
|
|||
return error("当前登陆用户无法强退");
|
||||
}
|
||||
onlineSession.setStatus(OnlineStatus.off_line);
|
||||
onlineSessionDAO.update(onlineSession);
|
||||
online.setStatus(OnlineStatus.off_line);
|
||||
userOnlineService.saveOnline(online);
|
||||
}
|
||||
|
@ -105,6 +106,7 @@ public class SysUserOnlineController extends BaseController
|
|||
return error("用户已下线");
|
||||
}
|
||||
onlineSession.setStatus(OnlineStatus.off_line);
|
||||
onlineSessionDAO.update(onlineSession);
|
||||
online.setStatus(OnlineStatus.off_line);
|
||||
userOnlineService.saveOnline(online);
|
||||
return success();
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.framework.shiro.session;
|
|||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.apache.shiro.session.UnknownSessionException;
|
||||
import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -54,6 +55,11 @@ public class OnlineSessionDAO extends EnterpriseCacheSessionDAO
|
|||
return sysShiroService.getSession(sessionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Session session) throws UnknownSessionException {
|
||||
super.update(session);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新会话;如更新会话最后访问时间/停止会话/设置超时时间/设置移除属性等会调用
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue