mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 11:08:38 +08:00
refactor(用例管理): 增加测试计划执行历史的计划id的获取
This commit is contained in:
parent
fa35b376f7
commit
7110f47191
@ -25,4 +25,8 @@ public class TestPlanCaseExecuteHistoryDTO extends TestPlanCaseExecuteHistory {
|
||||
@Schema(description = "测试计划名称")
|
||||
private String testPlanName;
|
||||
|
||||
@Schema(description = "测试计划id")
|
||||
private String testPlanId;
|
||||
|
||||
|
||||
}
|
||||
|
@ -91,6 +91,7 @@
|
||||
u.name as userName,
|
||||
ux.avatar as userLogo,
|
||||
tp.name as testPlanName,
|
||||
tp.id as testPlanId,
|
||||
u.email as email
|
||||
FROM
|
||||
test_plan_case_execute_history tpceh
|
||||
|
@ -0,0 +1,10 @@
|
||||
package io.metersphere.plan.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExtTestPlanCaseExecuteHistoryMapper {
|
||||
|
||||
void updateDeleted(@Param("testPlanCaseIds") List<String> testPlanCaseIds, @Param("deleted") boolean deleted);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.plan.mapper.ExtTestPlanCaseExecuteHistoryMapper">
|
||||
|
||||
<update id="updateDeleted">
|
||||
UPDATE
|
||||
test_plan_case_execute_history
|
||||
SET deleted =#{deleted}
|
||||
WHERE test_plan_case_id IN
|
||||
<foreach collection="testPlanCaseIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -101,6 +101,8 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
||||
@Resource
|
||||
private TestPlanCaseExecuteHistoryMapper testPlanCaseExecuteHistoryMapper;
|
||||
@Resource
|
||||
private ExtTestPlanCaseExecuteHistoryMapper extTestPlanCaseExecuteHistoryMapper;
|
||||
@Resource
|
||||
private FunctionalCaseAttachmentService functionalCaseAttachmentService;
|
||||
@Resource
|
||||
private TestPlanSendNoticeService testPlanSendNoticeService;
|
||||
@ -140,7 +142,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
||||
BugRelationCaseExample example = new BugRelationCaseExample();
|
||||
example.createCriteria().andTestPlanCaseIdIn(associationParam.getResourceIdList());
|
||||
bugRelationCaseMapper.deleteByExample(example);
|
||||
//TODO:更新执行历史的删除状态为true
|
||||
extTestPlanCaseExecuteHistoryMapper.updateDeleted(associationParam.getResourceIdList(), true);
|
||||
}
|
||||
|
||||
public TestPlanResourceSortResponse sortNode(ResourceSortRequest request, LogInsertModule logInsertModule) {
|
||||
|
Loading…
Reference in New Issue
Block a user