| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.system.query.SysOperLogQuery; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private ISysOperLogService operLogService; |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/operationLog/list"}, logical = Logical.OR) |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "获取操作日志列表", tags = {"管理后台-操作日志"}) |
| | | public AjaxResult<PageInfo<SysOperLog>> list(SysOperLogQuery query) { |
| | |
| | | if(null != query.getStartTime() && null != query.getEndTime()){ |
| | | wrapper.between(SysOperLog::getOperTime, query.getStartTime(), query.getEndTime()); |
| | | } |
| | | PageInfo<SysOperLog> page = operLogService.page(pageInfo, wrapper); |
| | | PageInfo<SysOperLog> page = operLogService.page(pageInfo, wrapper.orderByDesc(SysOperLog::getOperTime)); |
| | | return AjaxResult.success(page); |
| | | } |
| | | |
| | | |
| | | @Log(title = "操作日志", businessType = BusinessType.EXPORT) |
| | | @RequiresPermissions("system:operlog:export") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SysOperLog operLog) { |
| | | List<SysOperLog> list = operLogService.selectOperLogList(operLog); |
| | |
| | | } |
| | | |
| | | @Log(title = "操作日志", businessType = BusinessType.DELETE) |
| | | @RequiresPermissions("system:operlog:remove") |
| | | @DeleteMapping("/{operIds}") |
| | | public AjaxResult remove(@PathVariable Long[] operIds) { |
| | | return toAjax(operLogService.deleteOperLogByIds(operIds)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:operlog:remove") |
| | | @Log(title = "操作日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | public AjaxResult clean() { |