|
|
|
@ -17,7 +17,7 @@ import com.ruoyi.common.constant.ShiroConstants;
|
|
|
|
|
import com.ruoyi.framework.shiro.session.OnlineSession;
|
|
|
|
|
import com.ruoyi.framework.util.SpringUtils;
|
|
|
|
|
import com.ruoyi.system.domain.SysUserOnline;
|
|
|
|
|
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
|
|
|
|
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 主要是在此如果会话的属性修改了 就标识下其修改了 然后方便 OnlineSessionDao同步
|
|
|
|
@ -90,7 +90,7 @@ public class OnlineWebSessionManager extends DefaultWebSessionManager
|
|
|
|
|
|
|
|
|
|
int timeout = (int) this.getGlobalSessionTimeout();
|
|
|
|
|
Date expiredDate = DateUtils.addMilliseconds(new Date(), 0 - timeout);
|
|
|
|
|
SysUserOnlineServiceImpl userOnlineService = SpringUtils.getBean(SysUserOnlineServiceImpl.class);
|
|
|
|
|
ISysUserOnlineService userOnlineService = SpringUtils.getBean(ISysUserOnlineService.class);
|
|
|
|
|
List<SysUserOnline> userOnlineList = userOnlineService.selectOnlineByExpired(expiredDate);
|
|
|
|
|
// 批量过期删除
|
|
|
|
|
List<String> needOfflineIdList = new ArrayList<String>();
|
|
|
|
|