fix(接口测试): 修复接口导入选择覆盖模式,会把回收站的case恢复的缺陷
--bug=1027723 --user=王孝刚 【接口测试】github#25521,【接口定义】导入时选择覆盖操作,会把api下已删除的case还原成未删除了,而且已存在case出现2个,并未覆盖 https://www.tapd.cn/55049933/s/1392476
This commit is contained in:
parent
3002749f2d
commit
7953cb1b54
|
@ -394,8 +394,7 @@ public class ApiDefinitionImportUtil {
|
|||
Map<String, List<ApiTestCaseWithBLOBs>> oldCaseMap;
|
||||
List<String> definitionIds = repeatApiDefinitionWithBLOBs.stream().map(ApiDefinition::getId).collect(Collectors.toList());
|
||||
ApiTestCaseExample testCaseExample = new ApiTestCaseExample();
|
||||
testCaseExample.createCriteria().andApiDefinitionIdIn(definitionIds);
|
||||
testCaseExample.or(testCaseExample.createCriteria().andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue()).andStatusIsNull());
|
||||
testCaseExample.createCriteria().andApiDefinitionIdIn(definitionIds).andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue());
|
||||
List<ApiTestCaseWithBLOBs> caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(testCaseExample);
|
||||
oldCaseMap = caseWithBLOBs.stream().collect(Collectors.groupingBy(ApiTestCase::getApiDefinitionId));
|
||||
return oldCaseMap;
|
||||
|
|
Loading…
Reference in New Issue