From 8eff83e2b4e4e44e31db516b00967b2d5c5ede0a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 26 Jun 2024 17:40:01 +0800
Subject: [PATCH] 优化代码
---
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java
index 10a842b..67f44ab 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java
@@ -1,11 +1,13 @@
package com.ruoyi.quartz.controller;
import java.util.List;
+import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
@@ -46,22 +48,22 @@
*/
@PreAuthorize("@ss.hasPermi('monitor:job:export')")
@Log(title = "任务调度日志", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(SysJobLog sysJobLog)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, SysJobLog sysJobLog)
{
List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
- return util.exportExcel(list, "调度日志");
+ util.exportExcel(response, list, "调度日志");
}
/**
* 根据调度编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('monitor:job:query')")
- @GetMapping(value = "/{configId}")
+ @GetMapping(value = "/{jobLogId}")
public AjaxResult getInfo(@PathVariable Long jobLogId)
{
- return AjaxResult.success(jobLogService.selectJobLogById(jobLogId));
+ return success(jobLogService.selectJobLogById(jobLogId));
}
@@ -85,6 +87,6 @@
public AjaxResult clean()
{
jobLogService.cleanJobLog();
- return AjaxResult.success();
+ return success();
}
}
--
Gitblit v1.9.2