fix(测试跟踪): 关联用例删除时测试计划详情中相应用例列表的模块树显示问题
--bug=1015464 --user=宋昌昌 【测试跟踪】测试计划关联接口用例,把接口用例删除到回收站后执行测试计划还是会产生报告 https://www.tapd.cn/55049933/s/1214657
This commit is contained in:
parent
e2c5f37a52
commit
388ded7a26
|
@ -12,6 +12,7 @@ import io.metersphere.base.mapper.ApiTestCaseMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtApiDefinitionMapper;
|
import io.metersphere.base.mapper.ext.ExtApiDefinitionMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtApiModuleMapper;
|
import io.metersphere.base.mapper.ext.ExtApiModuleMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtApiTestCaseMapper;
|
import io.metersphere.base.mapper.ext.ExtApiTestCaseMapper;
|
||||||
|
import io.metersphere.commons.constants.CommonConstants;
|
||||||
import io.metersphere.commons.constants.TestCaseConstants;
|
import io.metersphere.commons.constants.TestCaseConstants;
|
||||||
import io.metersphere.commons.exception.MSException;
|
import io.metersphere.commons.exception.MSException;
|
||||||
import io.metersphere.commons.utils.BeanUtils;
|
import io.metersphere.commons.utils.BeanUtils;
|
||||||
|
@ -229,10 +230,12 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> definitionIds = apiTestCaseService.selectCasesBydIds(caseIds).stream()
|
List<String> definitionIds = apiTestCaseService.selectCasesBydIds(caseIds).stream()
|
||||||
|
.filter(apiTestCase -> apiTestCase.getStatus() == null || !CommonConstants.TrashStatus.equals(apiTestCase.getStatus()))
|
||||||
.map(ApiTestCase::getApiDefinitionId)
|
.map(ApiTestCase::getApiDefinitionId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> dataNodeIds = apiDefinitionService.selectApiDefinitionBydIds(definitionIds).stream()
|
List<String> dataNodeIds = apiDefinitionService.selectApiDefinitionBydIds(definitionIds).stream()
|
||||||
|
.filter(apiDefinition -> apiDefinition.getStatus() == null || !CommonConstants.TrashStatus.equals(apiDefinition.getStatus()))
|
||||||
.map(ApiDefinition::getModuleId)
|
.map(ApiDefinition::getModuleId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||||
import io.metersphere.base.mapper.ApiScenarioModuleMapper;
|
import io.metersphere.base.mapper.ApiScenarioModuleMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtApiScenarioModuleMapper;
|
import io.metersphere.base.mapper.ext.ExtApiScenarioModuleMapper;
|
||||||
|
import io.metersphere.commons.constants.CommonConstants;
|
||||||
import io.metersphere.commons.constants.TestCaseConstants;
|
import io.metersphere.commons.constants.TestCaseConstants;
|
||||||
import io.metersphere.commons.exception.MSException;
|
import io.metersphere.commons.exception.MSException;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
|
@ -195,6 +196,7 @@ public class ApiScenarioModuleService extends NodeTreeService<ApiScenarioModuleD
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> dataNodeIds = apiAutomationService.selectByIds(caseIds).stream()
|
List<String> dataNodeIds = apiAutomationService.selectByIds(caseIds).stream()
|
||||||
|
.filter(apiScenario -> apiScenario.getStatus() == null || !CommonConstants.TrashStatus.equals(apiScenario.getStatus()))
|
||||||
.map(ApiScenario::getApiScenarioModuleId)
|
.map(ApiScenario::getApiScenarioModuleId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue