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.system.domain.SysOperLog; import com.gkhy.exam.system.service.SysOperLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @Api(tags = "操作日志前端控制器") @RestController @RequestMapping("/monitor/operlog") public class SysOperLogController { @Autowired private SysOperLogService operLogService; @ApiOperation(value = "操作日志列表") @GetMapping("/list") public CommonResult list(SysOperLog operLog){ return CommonResult.success(operLogService.selectOperLogList(operLog)); } @Log(title = "操作日志", businessType = BusinessType.DELETE) @ApiOperation(value = "批量删除操作日志") @DeleteMapping("/{operIds}") public CommonResult remove(@PathVariable Long[] operIds) { return CommonResult.success(operLogService.deleteOperLogByIds(operIds)); } @Log(title = "操作日志", businessType = BusinessType.CLEAN) @DeleteMapping("/clean") public CommonResult clean() { operLogService.cleanOperLog(); return CommonResult.success(); } }