diff --git a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java index e340495f10..c34cf729fa 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java @@ -883,6 +883,9 @@ public class MockConfigService { RequestMockParams requestMockParams = MockApiUtils.genRequestMockParamsFromHttpRequest(request, false); String urlSuffix = this.getUrlSuffix(project.getSystemId(), request); + LogUtil.info("Mock urlSuffix:{}", urlSuffix); + LogUtil.info("Mock requestHeaderMap:{}", requestHeaderMap); + LogUtil.info("Mock requestMockParams:{}", requestMockParams); List qualifiedApiList = apiDefinitionService.preparedUrl(project.getId(), method, urlSuffix, requestHeaderMap.get(MockApiHeaders.MOCK_API_RESOURCE_ID)); /* GET/DELETE 这种通过url穿参数的接口,在接口路径相同的情况下可能会出现这样的情况: diff --git a/api-test/frontend/src/business/definition/components/case/ApiCaseItem.vue b/api-test/frontend/src/business/definition/components/case/ApiCaseItem.vue index bcfc0c1abe..192e41574b 100644 --- a/api-test/frontend/src/business/definition/components/case/ApiCaseItem.vue +++ b/api-test/frontend/src/business/definition/components/case/ApiCaseItem.vue @@ -575,6 +575,7 @@ export default { mergeRequestDocumentData(data.request); if (data.apiMethod !== 'SQL' && data.apiMethod !== 'DUBBO' && data.apiMethod !== 'dubbo://') { data.request.useEnvironment = this.environment; + data.request.environmentId = this.environment; } else { data.request.useEnvironment = data.request.environmentId; }