diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index eb3847aaf5..dedf77cb80 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -373,6 +373,8 @@ public class ApiDefinitionService { //如果存在则修改 apiDefinition.setId(sameRequest.get(0).getId()); String request = setImportHashTree(apiDefinition); + apiDefinition.setModuleId(sameRequest.get(0).getModuleId()); + apiDefinition.setModulePath(sameRequest.get(0).getModulePath()); apiDefinitionMapper.updateByPrimaryKeyWithBLOBs(apiDefinition); apiDefinition.setRequest(request); importApiCase(apiDefinition, apiTestCaseMapper, apiTestImportRequest, false);