From 96350be7a8fbfcb1163a5826022a442f8feb5fc9 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期四, 13 二月 2025 14:05:26 +0800
Subject: [PATCH] 修改全局Result字段
---
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
index 139361b..90e44e8 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
@@ -16,7 +16,7 @@
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.job.TaskException;
@@ -29,7 +29,7 @@
/**
* 璋冨害浠诲姟淇℃伅鎿嶄綔澶勭悊
- *
+ *
* @author ruoyi
*/
@RestController
@@ -69,7 +69,7 @@
*/
@PreAuthorize("@ss.hasPermi('monitor:job:query')")
@GetMapping(value = "/{jobId}")
- public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
+ public Result getInfo(@PathVariable("jobId") Long jobId)
{
return success(jobService.selectJobById(jobId));
}
@@ -80,7 +80,7 @@
@PreAuthorize("@ss.hasPermi('monitor:job:add')")
@Log(title = "瀹氭椂浠诲姟", businessType = BusinessType.INSERT)
@PostMapping
- public AjaxResult add(@RequestBody SysJob job) throws SchedulerException, TaskException
+ public Result add(@RequestBody SysJob job) throws SchedulerException, TaskException
{
if (!CronUtils.isValid(job.getCronExpression()))
{
@@ -116,7 +116,7 @@
@PreAuthorize("@ss.hasPermi('monitor:job:edit')")
@Log(title = "瀹氭椂浠诲姟", businessType = BusinessType.UPDATE)
@PutMapping
- public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException
+ public Result edit(@RequestBody SysJob job) throws SchedulerException, TaskException
{
if (!CronUtils.isValid(job.getCronExpression()))
{
@@ -152,7 +152,7 @@
@PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
@Log(title = "瀹氭椂浠诲姟", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
- public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
+ public Result changeStatus(@RequestBody SysJob job) throws SchedulerException
{
SysJob newJob = jobService.selectJobById(job.getJobId());
newJob.setStatus(job.getStatus());
@@ -165,7 +165,7 @@
@PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
@Log(title = "瀹氭椂浠诲姟", businessType = BusinessType.UPDATE)
@PutMapping("/run")
- public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
+ public Result run(@RequestBody SysJob job) throws SchedulerException
{
boolean result = jobService.run(job);
return result ? success() : error("浠诲姟涓嶅瓨鍦ㄦ垨宸茶繃鏈燂紒");
@@ -177,7 +177,7 @@
@PreAuthorize("@ss.hasPermi('monitor:job:remove')")
@Log(title = "瀹氭椂浠诲姟", businessType = BusinessType.DELETE)
@DeleteMapping("/{jobIds}")
- public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
+ public Result remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
{
jobService.deleteJobByIds(jobIds);
return success();
--
Gitblit v1.9.3