From 33bf583dab818c07beda71add5e4e01d39a33c2a Mon Sep 17 00:00:00 2001 From: liangdaliang Date: Mon, 24 Mar 2025 10:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=97=E8=A1=A8=E5=92=8C=E6=93=8D=E4=BD=9C=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/controller/TestTaskController.java | 34 +++++++++++++++++++ .../mapper/test/TestTaskLogMapper.xml | 1 + .../mapper/test/TestTaskResultMapper.xml | 1 + test-ui/src/api/test/task.js | 18 ++++++++++ 4 files changed, 54 insertions(+) diff --git a/test-test/src/main/java/com/test/test/controller/TestTaskController.java b/test-test/src/main/java/com/test/test/controller/TestTaskController.java index f5a0666..4034176 100644 --- a/test-test/src/main/java/com/test/test/controller/TestTaskController.java +++ b/test-test/src/main/java/com/test/test/controller/TestTaskController.java @@ -8,8 +8,12 @@ import com.test.common.enums.BusinessType; import com.test.common.utils.DateUtils; import com.test.common.utils.SecurityUtils; import com.test.test.domain.TestTask; +import com.test.test.domain.TestTaskLog; +import com.test.test.domain.TestTaskResult; import com.test.test.domain.qo.GroupIdQO; import com.test.test.domain.qo.IDQO; +import com.test.test.service.ITestTaskLogService; +import com.test.test.service.ITestTaskResultService; import com.test.test.service.ITestTaskService; import jakarta.annotation.Resource; import org.springframework.beans.factory.annotation.Value; @@ -32,6 +36,12 @@ public class TestTaskController extends BaseController { @Resource private ITestTaskService testTaskService; + @Resource + private ITestTaskResultService testTaskResultService; + + @Resource + private ITestTaskLogService taskLogService; + /** * 查询定时任务列表 */ @@ -42,6 +52,30 @@ public class TestTaskController extends BaseController { return getDataTable(list); } + /** + * 查询定时任务执行记录列表 + */ + @GetMapping("/taskResultListByTaskId") + public TableDataInfo taskResultListByTaskId(@Validated IDQO qo) { + startPage(); + TestTaskResult testTaskResult = new TestTaskResult(); + testTaskResult.setTaskId(qo.getId()); + List list = testTaskResultService.selectTestTaskResultList(testTaskResult); + return getDataTable(list); + } + + /** + * 查询定时任务操作记录列表 + */ + @GetMapping("/taskLogListByTaskId") + public TableDataInfo taskLogListByTaskId(@Validated IDQO qo) { + startPage(); + TestTaskLog testTaskLog = new TestTaskLog(); + testTaskLog.setTaskId(qo.getId()); + List list = taskLogService.selectTestTaskLogList(testTaskLog); + return getDataTable(list); + } + /** * 获取定时任务详细信息 */ diff --git a/test-test/src/main/resources/mapper/test/TestTaskLogMapper.xml b/test-test/src/main/resources/mapper/test/TestTaskLogMapper.xml index 93eeeff..be76cbd 100644 --- a/test-test/src/main/resources/mapper/test/TestTaskLogMapper.xml +++ b/test-test/src/main/resources/mapper/test/TestTaskLogMapper.xml @@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and oper_user = #{operUser} and oper_time = #{operTime} + order by oper_time desc