在线用户服务修改

dep_wangsr
RuoYi 6 years ago committed by Limy
parent 3e1e904ea6
commit 0763844f80

@ -14,8 +14,8 @@ import com.ruoyi.system.domain.SysLogininfor;
import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.system.domain.SysUserOnline;
import com.ruoyi.system.service.ISysOperLogService;
import com.ruoyi.system.service.ISysUserOnlineService;
import com.ruoyi.system.service.impl.SysLogininforServiceImpl;
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
import eu.bitwalker.useragentutils.UserAgent;
/**
@ -53,7 +53,7 @@ public class AsyncFactory
online.setBrowser(session.getBrowser());
online.setOs(session.getOs());
online.setStatus(session.getStatus());
SpringUtils.getBean(SysUserOnlineServiceImpl.class).saveOnline(online);
SpringUtils.getBean(ISysUserOnlineService.class).saveOnline(online);
}
};

@ -10,7 +10,7 @@ import com.ruoyi.common.enums.OnlineStatus;
import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.system.domain.SysUserOnline;
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
import com.ruoyi.system.service.ISysUserOnlineService;
/**
* ShiroSessiondb
@ -31,7 +31,7 @@ public class OnlineSessionDAO extends EnterpriseCacheSessionDAO
private static final String LAST_SYNC_DB_TIMESTAMP = OnlineSessionDAO.class.getName() + "LAST_SYNC_DB_TIMESTAMP";
@Autowired
private SysUserOnlineServiceImpl onlineService;
private ISysUserOnlineService onlineService;
public OnlineSessionDAO()
{

@ -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>();

@ -3,7 +3,7 @@ package com.ruoyi.system.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysUserOnline;
@ -15,7 +15,7 @@ import com.ruoyi.system.service.ISysUserOnlineService;
*
* @author ruoyi
*/
@Component
@Service
public class SysUserOnlineServiceImpl implements ISysUserOnlineService
{
@Autowired

Loading…
Cancel
Save