| | |
| | | package com.ruoyi.project.monitor.controller; |
| | | |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.service.SysPasswordService; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.project.monitor.domain.SysLogininfor; |
| | | import com.ruoyi.project.monitor.service.ISysLogininforService; |
| | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{infoIds}") |
| | | public R<?> remove(@PathVariable Long[] infoIds) { |
| | | logininforService.deleteLogininforByIds(infoIds); |
| | | return R.ok(); |
| | | public AjaxResult remove(@PathVariable Long[] infoIds) { |
| | | return toAjax(logininforService.deleteLogininforByIds(infoIds)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | public R<?> clean() { |
| | | public AjaxResult clean() { |
| | | logininforService.cleanLogininfor(); |
| | | return R.ok(); |
| | | return success(); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')") |
| | | @Log(title = "账户解锁", businessType = BusinessType.OTHER) |
| | | @GetMapping("/unlock/{userName}") |
| | | public R<?> unlock(@PathVariable("userName") String userName) { |
| | | public AjaxResult unlock(@PathVariable("userName") String userName) { |
| | | passwordService.clearLoginRecordCache(userName); |
| | | return R.ok(); |
| | | return success(); |
| | | } |
| | | } |
| | | } |