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