| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @author Lion Li |
| | | */ |
| | | @Validated |
| | | @Tag(name ="操作日志记录", description = "操作日志记录管理") |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/monitor/operlog") |
| | |
| | | |
| | | private final ISysOperLogService operLogService; |
| | | |
| | | @Operation(summary = "查询操作日志记录列表") |
| | | /** |
| | | * 获取操作日志记录列表 |
| | | */ |
| | | @SaCheckPermission("monitor:operlog:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysOperLog> list(SysOperLog operLog, PageQuery pageQuery) { |
| | | return operLogService.selectPageOperLogList(operLog, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出操作日志记录列表") |
| | | /** |
| | | * 导出操作日志记录列表 |
| | | */ |
| | | @Log(title = "操作日志", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("monitor:operlog:export") |
| | | @PostMapping("/export") |
| | |
| | | ExcelUtil.exportExcel(list, "操作日志", SysOperLog.class, response); |
| | | } |
| | | |
| | | @Operation(summary = "删除操作日志记录") |
| | | /** |
| | | * 批量删除操作日志记录 |
| | | * @param operIds 日志ids |
| | | */ |
| | | @Log(title = "操作日志", businessType = BusinessType.DELETE) |
| | | @SaCheckPermission("monitor:operlog:remove") |
| | | @DeleteMapping("/{operIds}") |
| | |
| | | return toAjax(operLogService.deleteOperLogByIds(operIds)); |
| | | } |
| | | |
| | | @Operation(summary = "清空操作日志记录") |
| | | /** |
| | | * 清理操作日志记录 |
| | | */ |
| | | @Log(title = "操作日志", businessType = BusinessType.CLEAN) |
| | | @SaCheckPermission("monitor:operlog:remove") |
| | | @DeleteMapping("/clean") |