任务执行记录列表和操作日志列表接口提交
This commit is contained in:
@@ -8,8 +8,12 @@ import com.test.common.enums.BusinessType;
|
|||||||
import com.test.common.utils.DateUtils;
|
import com.test.common.utils.DateUtils;
|
||||||
import com.test.common.utils.SecurityUtils;
|
import com.test.common.utils.SecurityUtils;
|
||||||
import com.test.test.domain.TestTask;
|
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.GroupIdQO;
|
||||||
import com.test.test.domain.qo.IDQO;
|
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 com.test.test.service.ITestTaskService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -32,6 +36,12 @@ public class TestTaskController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ITestTaskService testTaskService;
|
private ITestTaskService testTaskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITestTaskResultService testTaskResultService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITestTaskLogService taskLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询定时任务列表
|
* 查询定时任务列表
|
||||||
*/
|
*/
|
||||||
@@ -42,6 +52,30 @@ public class TestTaskController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询定时任务执行记录列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/taskResultListByTaskId")
|
||||||
|
public TableDataInfo taskResultListByTaskId(@Validated IDQO qo) {
|
||||||
|
startPage();
|
||||||
|
TestTaskResult testTaskResult = new TestTaskResult();
|
||||||
|
testTaskResult.setTaskId(qo.getId());
|
||||||
|
List<TestTaskResult> 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<TestTaskLog> list = taskLogService.selectTestTaskLogList(testTaskLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取定时任务详细信息
|
* 获取定时任务详细信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="operUser != null and operUser != ''"> and oper_user = #{operUser}</if>
|
<if test="operUser != null and operUser != ''"> and oper_user = #{operUser}</if>
|
||||||
<if test="operTime != null "> and oper_time = #{operTime}</if>
|
<if test="operTime != null "> and oper_time = #{operTime}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by oper_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTestTaskLogById" parameterType="Long" resultMap="TestTaskLogResult">
|
<select id="selectTestTaskLogById" parameterType="Long" resultMap="TestTaskLogResult">
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="caseStepCount != null "> and case_step_count = #{caseStepCount}</if>
|
<if test="caseStepCount != null "> and case_step_count = #{caseStepCount}</if>
|
||||||
<if test="resultDesc != null and resultDesc != ''"> and result_desc = #{resultDesc}</if>
|
<if test="resultDesc != null and resultDesc != ''"> and result_desc = #{resultDesc}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTestTaskResultById" parameterType="Long" resultMap="TestTaskResultResult">
|
<select id="selectTestTaskResultById" parameterType="Long" resultMap="TestTaskResultResult">
|
||||||
|
|||||||
@@ -18,6 +18,24 @@ export function getTask(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询定时任务执行记录列表
|
||||||
|
export function taskResultListByTaskId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/test/task/taskResultListByTaskId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询定时任务操作记录列表
|
||||||
|
export function taskLogListByTaskId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/test/task/taskLogListByTaskId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 新增用例
|
// 新增用例
|
||||||
export function addTask(data) {
|
export function addTask(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
Reference in New Issue
Block a user