com.ruoyi.system.domain.SysLogininfor Java Examples
The following examples show how to use
com.ruoyi.system.domain.SysLogininfor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SysLogininforController.java From RuoYi with Apache License 2.0 | 5 votes |
@Log(title = "登陆日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:logininfor:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysLogininfor logininfor) { List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); ExcelUtil<SysLogininfor> util = new ExcelUtil<>(SysLogininfor.class); return util.exportExcel(list, "登陆日志"); }
Example #2
Source File: SysLogininforController.java From supplierShop with MIT License | 5 votes |
@Log(title = "登陆日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:logininfor:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysLogininfor logininfor) { List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class); return util.exportExcel(list, "登陆日志"); }
Example #3
Source File: AsyncFactory.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 记录登陆信息 * * @param username 用户名 * @param status 状态 * @param message 消息 * @param args 列表 * @return 任务task */ public static TimerTask recordLogininfor(final String username, final String status, final String message, final Object... args) { final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); final String ip = ShiroUtils.getIp(); return new TimerTask() { @Override public void run() { // 打印信息到日志 String address = AddressUtils.getRealAddressByIp(ip); String s = LogUtils.getBlock(ip) + address + LogUtils.getBlock(username) + LogUtils.getBlock(status) + LogUtils.getBlock(message); sys_user_logger.info(s, args); // 获取客户端操作系统 String os = userAgent.getOperatingSystem().getName(); // 获取客户端浏览器 String browser = userAgent.getBrowser().getName(); // 封装对象 SysLogininfor logininfor = new SysLogininfor(); logininfor.setLoginName(username); logininfor.setIpaddr(ip); logininfor.setLoginLocation(address); logininfor.setBrowser(browser); logininfor.setOs(os); logininfor.setMsg(message); // 日志状态 if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) { logininfor.setStatus(Constants.SUCCESS); } else if (Constants.LOGIN_FAIL.equals(status)) { logininfor.setStatus(Constants.FAIL); } // 插入数据 SpringUtils.getBean(SysLogininforServiceImpl.class).insertLogininfor(logininfor); } }; }
Example #4
Source File: SysLogininforController.java From ruoyiplus with MIT License | 5 votes |
@Log(title = "登陆日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:logininfor:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysLogininfor logininfor) { List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class); return util.exportExcel(list, "登陆日志"); }
Example #5
Source File: SysLogininforServiceImpl.java From supplierShop with MIT License | 4 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ @Override public void insertLogininfor(SysLogininfor logininfor) { logininforMapper.insertLogininfor(logininfor); }
Example #6
Source File: AsyncFactory.java From ruoyiplus with MIT License | 4 votes |
/** * 记录登陆信息 * * @param username 用户名 * @param status 状态 * @param message 消息 * @param args 列表 * @return 任务task */ public static TimerTask recordLogininfor(final String username, final String status, final String message, final Object... args) { final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); final String ip = ShiroUtils.getIp(); return new TimerTask() { @Override public void run() { StringBuilder s = new StringBuilder(); s.append(LogUtils.getBlock(ip)); s.append(AddressUtils.getRealAddressByIP(ip)); s.append(LogUtils.getBlock(username)); s.append(LogUtils.getBlock(status)); s.append(LogUtils.getBlock(message)); // 打印信息到日志 sys_user_logger.info(s.toString(), args); // 获取客户端操作系统 String os = userAgent.getOperatingSystem().getName(); // 获取客户端浏览器 String browser = userAgent.getBrowser().getName(); // 封装对象 SysLogininfor logininfor = new SysLogininfor(); logininfor.setLoginName(username); logininfor.setIpaddr(ip); logininfor.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); logininfor.setBrowser(browser); logininfor.setOs(os); logininfor.setMsg(message); // 日志状态 if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) { logininfor.setStatus(Constants.SUCCESS); } else if (Constants.LOGIN_FAIL.equals(status)) { logininfor.setStatus(Constants.FAIL); } // 插入数据 SpringUtils.getBean(SysLogininforServiceImpl.class).insertLogininfor(logininfor); } }; }
Example #7
Source File: SysLogininforServiceImpl.java From ruoyiplus with MIT License | 4 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ @Override public void insertLogininfor(SysLogininfor logininfor) { logininforMapper.insertLogininfor(logininfor); }
Example #8
Source File: AsyncFactory.java From supplierShop with MIT License | 4 votes |
/** * 记录登陆信息 * * @param username 用户名 * @param status 状态 * @param message 消息 * @param args 列表 * @return 任务task */ public static TimerTask recordLogininfor(final String username, final String status, final String message, final Object... args) { final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); final String ip = ShiroUtils.getIp(); return new TimerTask() { @Override public void run() { String address = AddressUtils.getRealAddressByIP(ip); StringBuilder s = new StringBuilder(); s.append(LogUtils.getBlock(ip)); s.append(address); s.append(LogUtils.getBlock(username)); s.append(LogUtils.getBlock(status)); s.append(LogUtils.getBlock(message)); // 打印信息到日志 sys_user_logger.info(s.toString(), args); // 获取客户端操作系统 String os = userAgent.getOperatingSystem().getName(); // 获取客户端浏览器 String browser = userAgent.getBrowser().getName(); // 封装对象 SysLogininfor logininfor = new SysLogininfor(); logininfor.setLoginName(username); logininfor.setIpaddr(ip); logininfor.setLoginLocation(address); logininfor.setBrowser(browser); logininfor.setOs(os); logininfor.setMsg(message); // 日志状态 if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) { logininfor.setStatus(Constants.SUCCESS); } else if (Constants.LOGIN_FAIL.equals(status)) { logininfor.setStatus(Constants.FAIL); } // 插入数据 SpringUtils.getBean(SysLogininforServiceImpl.class).insertLogininfor(logininfor); } }; }
Example #9
Source File: SysLogininforServiceImpl.java From ruoyiplus with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ @Override public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) { return logininforMapper.selectLogininforList(logininfor); }
Example #10
Source File: SysLogininforMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #11
Source File: SysLogininforMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ void insertLogininfor(SysLogininfor logininfor);
Example #12
Source File: SysLogininforServiceImpl.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ @Override public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) { return logininforMapper.selectLogininforList(logininfor); }
Example #13
Source File: SysLogininforServiceImpl.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ @Override public void insertLogininfor(SysLogininfor logininfor) { logininforMapper.insertLogininfor(logininfor); }
Example #14
Source File: ISysLogininforService.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #15
Source File: ISysLogininforService.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ void insertLogininfor(SysLogininfor logininfor);
Example #16
Source File: SysLogininforMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #17
Source File: SysLogininforMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor);
Example #18
Source File: ISysLogininforService.java From ruoyiplus with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #19
Source File: ISysLogininforService.java From ruoyiplus with MIT License | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor);
Example #20
Source File: SysLogininforMapper.java From supplierShop with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #21
Source File: SysLogininforMapper.java From supplierShop with MIT License | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor);
Example #22
Source File: SysLogininforServiceImpl.java From supplierShop with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ @Override public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) { return logininforMapper.selectLogininforList(logininfor); }
Example #23
Source File: ISysLogininforService.java From supplierShop with MIT License | 2 votes |
/** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
Example #24
Source File: ISysLogininforService.java From supplierShop with MIT License | 2 votes |
/** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor);