| | |
| | | package com.gkhy.exam.admin.controller.monitor; |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.framework.web.service.SysPasswordService; |
| | | import com.gkhy.exam.system.domain.SysLogininfor; |
| | | import com.gkhy.exam.system.service.SysLogininforService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 系统访问记录 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | //@Api(tags = "系统访问记录前端控制器") |
| | | //@RestController |
| | | //@RequestMapping("/monitor/logininfor") |
| | | //public class SysLogininforController { |
| | | // @Autowired |
| | | // private SysLogininforService logininforService; |
| | | // |
| | | // @Autowired |
| | | // private SysPasswordService passwordService; |
| | | // |
| | | // @ApiOperation(value = "系统访问记录列表") |
| | | // @GetMapping("/list") |
| | | // public CommonResult list(SysLogininfor logininfor) |
| | | // { |
| | | // return CommonResult.success(logininforService.selectLogininforList(logininfor)); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "批量删除访问记录") |
| | | // @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | // @DeleteMapping("/{infoIds}") |
| | | // public CommonResult remove(@PathVariable Long[] infoIds) |
| | | // { |
| | | // return CommonResult.success(logininforService.deleteLogininforByIds(infoIds)); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "清空访问记录") |
| | | // @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | // @DeleteMapping("/clean") |
| | | // public CommonResult clean() |
| | | // { |
| | | // logininforService.cleanLogininfor(); |
| | | // return CommonResult.success(); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "账户解锁") |
| | | // @Log(title = "账户解锁", businessType = BusinessType.OTHER) |
| | | // @GetMapping("/unlock/{userName}") |
| | | // public CommonResult unlock(@PathVariable("userName") String userName) |
| | | // { |
| | | // // passwordService.clearLoginRecordCache(userName); |
| | | // return CommonResult.success(); |
| | | // } |
| | | //} |
| | | @Api(tags = "系统访问记录前端控制器") |
| | | @RestController |
| | | @RequestMapping("/monitor/logininfor") |
| | | public class SysLogininforController { |
| | | @Autowired |
| | | private SysLogininforService logininforService; |
| | | |
| | | @Autowired |
| | | private SysPasswordService passwordService; |
| | | |
| | | @ApiOperation(value = "系统访问记录列表") |
| | | @GetMapping("/list") |
| | | public CommonResult list(SysLogininfor logininfor) |
| | | { |
| | | return CommonResult.success(logininforService.selectLogininforList(logininfor)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除访问记录") |
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{infoIds}") |
| | | public CommonResult remove(@PathVariable Long[] infoIds) |
| | | { |
| | | return CommonResult.success(logininforService.deleteLogininforByIds(infoIds)); |
| | | } |
| | | |
| | | @ApiOperation(value = "清空访问记录") |
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | public CommonResult clean() |
| | | { |
| | | logininforService.cleanLogininfor(); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "账户解锁") |
| | | @Log(title = "账户解锁", businessType = BusinessType.OTHER) |
| | | @GetMapping("/unlock/{userName}") |
| | | public CommonResult unlock(@PathVariable("userName") String userName) |
| | | { |
| | | // passwordService.clearLoginRecordCache(userName); |
| | | return CommonResult.success(); |
| | | } |
| | | } |