diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/utils/ApiDefinitionUtils.java b/backend/services/api-test/src/main/java/io/metersphere/api/utils/ApiDefinitionUtils.java index 6c295269f0..1e8685c6e1 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/utils/ApiDefinitionUtils.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/utils/ApiDefinitionUtils.java @@ -29,6 +29,9 @@ public class ApiDefinitionUtils { customRequestUrl = customRequestUrl.substring(1); } if (StringUtils.isNotEmpty(customRequestUrl)) { + if (customRequestUrl.contains("?")) { + customRequestUrl = customRequestUrl.substring(0, customRequestUrl.indexOf("?")); + } String[] customUrlArr = customRequestUrl.split("/"); if (StringUtils.startsWithAny(customRequestUrl.toLowerCase(), "https://", "http://") diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleService.java index bde04c0ec5..c300a5995c 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleService.java @@ -167,6 +167,7 @@ public class TestPlanModuleService extends ModuleTreeService { TestPlanModuleExample example = new TestPlanModuleExample(); // 拖拽后, 父级模块下存在同名模块 example.createCriteria().andParentIdEqualTo(nodeSortDTO.getParent().getId()).andNameEqualTo(nodeSortDTO.getNode().getName()) + .andProjectIdEqualTo(nodeSortDTO.getNode().getProjectId()) .andIdNotEqualTo(nodeSortDTO.getNode().getId()); if (testPlanModuleMapper.countByExample(example) > 0) { throw new MSException(Translator.get("test_plan_module_already_exists"));