fix(接口测试): 修复接口导入时没有过滤回收站用例的问题
This commit is contained in:
parent
7b6ebc3132
commit
b39aa92da0
|
@ -20,7 +20,6 @@ import io.metersphere.project.api.KeyValueEnableParam;
|
||||||
import io.metersphere.project.constants.PropertyConstant;
|
import io.metersphere.project.constants.PropertyConstant;
|
||||||
import io.metersphere.project.domain.Project;
|
import io.metersphere.project.domain.Project;
|
||||||
import io.metersphere.project.mapper.ExtBaseProjectVersionMapper;
|
import io.metersphere.project.mapper.ExtBaseProjectVersionMapper;
|
||||||
import io.metersphere.project.mapper.ProjectApplicationMapper;
|
|
||||||
import io.metersphere.project.mapper.ProjectMapper;
|
import io.metersphere.project.mapper.ProjectMapper;
|
||||||
import io.metersphere.sdk.constants.ApplicationNumScope;
|
import io.metersphere.sdk.constants.ApplicationNumScope;
|
||||||
import io.metersphere.sdk.constants.ModuleConstants;
|
import io.metersphere.sdk.constants.ModuleConstants;
|
||||||
|
@ -72,8 +71,6 @@ public class ApiDefinitionImportService {
|
||||||
@Resource
|
@Resource
|
||||||
private ExtBaseProjectVersionMapper extBaseProjectVersionMapper;
|
private ExtBaseProjectVersionMapper extBaseProjectVersionMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ProjectApplicationMapper projectApplicationMapper;
|
|
||||||
@Resource
|
|
||||||
private ExtApiDefinitionModuleMapper extApiDefinitionModuleMapper;
|
private ExtApiDefinitionModuleMapper extApiDefinitionModuleMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ExtApiDefinitionMapper extApiDefinitionMapper;
|
private ExtApiDefinitionMapper extApiDefinitionMapper;
|
||||||
|
@ -92,11 +89,7 @@ public class ApiDefinitionImportService {
|
||||||
@Resource
|
@Resource
|
||||||
private UserMapper userMapper;
|
private UserMapper userMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ApiDefinitionModuleMapper apiDefinitionModuleMapper;
|
|
||||||
@Resource
|
|
||||||
private ApiDefinitionMockMapper apiDefinitionMockMapper;
|
private ApiDefinitionMockMapper apiDefinitionMockMapper;
|
||||||
@Resource
|
|
||||||
private ApiDefinitionMapper apiDefinitionMapper;
|
|
||||||
|
|
||||||
private void initImportRequestAndCheck(MultipartFile file, ImportRequest request, String projectId) {
|
private void initImportRequestAndCheck(MultipartFile file, ImportRequest request, String projectId) {
|
||||||
if (StringUtils.isBlank(request.getProjectId())) {
|
if (StringUtils.isBlank(request.getProjectId())) {
|
||||||
|
@ -670,7 +663,7 @@ public class ApiDefinitionImportService {
|
||||||
|
|
||||||
public Map<String, List<ApiTestCase>> selectApiTestCaseIdMap(List<String> apiDefinitionIds) {
|
public Map<String, List<ApiTestCase>> selectApiTestCaseIdMap(List<String> apiDefinitionIds) {
|
||||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||||
example.createCriteria().andApiDefinitionIdIn(apiDefinitionIds);
|
example.createCriteria().andApiDefinitionIdIn(apiDefinitionIds).andDeletedEqualTo(false);
|
||||||
List<ApiTestCase> apiTestCaseList = apiTestCaseMapper.selectByExample(example);
|
List<ApiTestCase> apiTestCaseList = apiTestCaseMapper.selectByExample(example);
|
||||||
return apiTestCaseList.stream().collect(Collectors.groupingBy(ApiTestCase::getApiDefinitionId));
|
return apiTestCaseList.stream().collect(Collectors.groupingBy(ApiTestCase::getApiDefinitionId));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue