fix: 导入接口用例创建到默认模块

This commit is contained in:
chenjianxing 2021-03-30 11:30:52 +08:00
parent e56e2e19b5
commit 6240306795
2 changed files with 4 additions and 4 deletions

View File

@ -242,7 +242,7 @@ public class ApiAutomationService {
} else {
scenario.setUserId(request.getUserId());
}
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath())) {
if (StringUtils.isEmpty(request.getApiScenarioModuleId())) {
scenario.setApiScenarioModuleId("root");
scenario.setModulePath("/默认模块");
}

View File

@ -262,7 +262,7 @@ public class ApiDefinitionService {
test.setEnvironmentId(request.getEnvironmentId());
test.setUserId(request.getUserId());
test.setTags(request.getTags());
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
if (StringUtils.isEmpty(request.getModuleId())) {
test.setModulePath("/默认模块");
test.setModuleId("root");
}
@ -290,7 +290,7 @@ public class ApiDefinitionService {
test.setStatus(APITestStatus.Underway.name());
test.setModulePath(request.getModulePath());
test.setModuleId(request.getModuleId());
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
if (StringUtils.isEmpty(request.getModuleId())) {
test.setModulePath("/默认模块");
test.setModuleId("root");
}
@ -604,7 +604,7 @@ public class ApiDefinitionService {
}
for (int i = 0; i < data.size(); i++) {
ApiDefinitionWithBLOBs item = data.get(i);
if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath())) {
if (StringUtils.isEmpty(item.getModuleId())) {
item.setModuleId("root");
item.setModulePath("/默认模块");
}