package org.jeecg.modules.quartz.controller;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.apache.commons.lang3.StringUtils;
|
import org.apache.shiro.SecurityUtils;
|
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.modules.quartz.dto.SysQuartzLogDto;
|
import org.jeecg.modules.quartz.entity.SysQuartzLog;
|
import org.jeecg.modules.quartz.service.ISysQuartzLogService;
|
import org.jeecg.modules.quartz.vo.SysQuartzLogVo;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import javax.annotation.Resource;
|
import javax.servlet.http.HttpServletRequest;
|
|
/**
|
* @Description: 定时任务日志
|
* @author: LiuS
|
* @create: 2023-08-05 14:01
|
*/
|
@Slf4j
|
@Api(tags = "定时任务日志接口")
|
@RestController
|
@RequestMapping("/sys/quartzLog")
|
public class SysQuartzLogController extends JeecgController<SysQuartzLog, ISysQuartzLogService> {
|
|
@Resource
|
private ISysQuartzLogService sysQuartzLogService;
|
|
@AutoLog(value = "定时任务日志接口-分页列表查询")
|
@ApiOperation(value = "定时任务日志接口-分页列表查询", notes = "定时任务日志接口-分页列表查询")
|
@GetMapping(value = "/list")
|
public Result<IPage<SysQuartzLogDto>> queryList(SysQuartzLogVo sysQuartzLogVo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
if (StringUtils.isBlank(sysQuartzLogVo.getJobId())) {
|
return Result.error("任务ID不能为空!");
|
}
|
IPage<SysQuartzLogDto> result = sysQuartzLogService.pageList(pageNo, pageSize, sysQuartzLogVo);
|
return Result.OK(result);
|
}
|
|
@AutoLog(value = "定时任务日志接口-导出")
|
@ApiOperation(value = "定时任务日志接口-导出", notes = "定时任务日志接口-导出")
|
@RequestMapping("/exportXls")
|
public ModelAndView exportXls(HttpServletRequest request, SysQuartzLogVo sysQuartzLogVo) {
|
return this.sysQuartzLogService.exportXls(sysQuartzLogVo);
|
}
|
|
|
}
|