| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /*
- * Copyright (c) 2021-2025, LXQ All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: LXQ (609827073@qq.com)
- */
- package com.kxs.daemon.quartz.controller;
- import cn.hutool.core.collection.CollUtil;
- import com.baomidou.mybatisplus.core.toolkit.Wrappers;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.kxs.common.core.util.R;
- import com.kxs.daemon.quartz.entity.SysJobLog;
- import com.kxs.daemon.quartz.service.SysJobLogService;
- import io.swagger.v3.oas.annotations.Operation;
- import io.swagger.v3.oas.annotations.security.SecurityRequirement;
- import io.swagger.v3.oas.annotations.tags.Tag;
- import lombok.AllArgsConstructor;
- import org.springframework.http.HttpHeaders;
- import org.springframework.web.bind.annotation.*;
- /**
- * @author LXQ
- * <p>
- * 定时任务执行日志表
- */
- @RestController
- @AllArgsConstructor
- @RequestMapping("/sys-job-log")
- @Tag(description = "sys-job-log", name = "定时任务日志")
- @SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
- public class SysJobLogController {
- private final SysJobLogService sysJobLogService;
- /**
- * 分页查询
- * @param page 分页对象
- * @param sysJobLog 定时任务执行日志表
- * @return
- */
- @GetMapping("/page")
- @Operation(description = "分页定时任务日志查询")
- public R getSysJobLogPage(Page page, SysJobLog sysJobLog) {
- return R.ok(sysJobLogService.page(page, Wrappers.query(sysJobLog)));
- }
- @DeleteMapping
- @Operation(description = "批量删除日志")
- public R deleteLogs(@RequestBody Long[] ids) {
- return R.ok(sysJobLogService.removeBatchByIds(CollUtil.toList(ids)));
- }
- }
|