parent
b5ca7416e9
commit
fabaffad25
|
@ -24,6 +24,7 @@ import io.metersphere.service.BaseProjectApplicationService;
|
||||||
import io.metersphere.service.MockConfigService;
|
import io.metersphere.service.MockConfigService;
|
||||||
import io.metersphere.service.ServiceUtils;
|
import io.metersphere.service.ServiceUtils;
|
||||||
import io.metersphere.service.ext.ExtApiScheduleService;
|
import io.metersphere.service.ext.ExtApiScheduleService;
|
||||||
|
import io.metersphere.xpack.api.service.ApiDefinitionSyncService;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -55,8 +56,6 @@ public class ApiDefinitionImportUtilService {
|
||||||
@Resource
|
@Resource
|
||||||
private BaseProjectApplicationService projectApplicationService;
|
private BaseProjectApplicationService projectApplicationService;
|
||||||
@Resource
|
@Resource
|
||||||
private ApiModuleService apiModuleService;
|
|
||||||
@Resource
|
|
||||||
private SqlSessionFactory sqlSessionFactory;
|
private SqlSessionFactory sqlSessionFactory;
|
||||||
@Resource
|
@Resource
|
||||||
private BaseProjectVersionMapper baseProjectVersionMapper;
|
private BaseProjectVersionMapper baseProjectVersionMapper;
|
||||||
|
@ -172,6 +171,7 @@ public class ApiDefinitionImportUtilService {
|
||||||
if (filterData.isEmpty()) {
|
if (filterData.isEmpty()) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
ApiModuleService apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class);
|
||||||
//处理模块路径
|
//处理模块路径
|
||||||
UpdateApiModuleDTO updateApiModuleDTO = apiModuleService.checkApiModule(request, apiImport, filterData, StringUtils.equals("fullCoverage", request.getModeId()), urlRepeat);
|
UpdateApiModuleDTO updateApiModuleDTO = apiModuleService.checkApiModule(request, apiImport, filterData, StringUtils.equals("fullCoverage", request.getModeId()), urlRepeat);
|
||||||
//重新设置模块路径后的数据
|
//重新设置模块路径后的数据
|
||||||
|
@ -1006,6 +1006,7 @@ public class ApiDefinitionImportUtilService {
|
||||||
if (StringUtils.isBlank(modulePath)) {
|
if (StringUtils.isBlank(modulePath)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ApiModuleService apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class);
|
||||||
String[] pathTree = apiModuleService.getPathTree(modulePath);
|
String[] pathTree = apiModuleService.getPathTree(modulePath);
|
||||||
String lastPath = pathTree[pathTree.length - 1];
|
String lastPath = pathTree[pathTree.length - 1];
|
||||||
String substring = modulePath.substring(0, modulePath.indexOf("/" + lastPath));
|
String substring = modulePath.substring(0, modulePath.indexOf("/" + lastPath));
|
||||||
|
@ -1240,4 +1241,5 @@ public class ApiDefinitionImportUtilService {
|
||||||
currentApiCaseOrder.set(order);
|
currentApiCaseOrder.set(order);
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue