diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java index d3c5ebbbcb..2134ca6c42 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java @@ -10,24 +10,23 @@ import io.metersphere.api.dto.definition.request.MsScenario; import io.metersphere.api.dto.definition.request.ParameterConfig; import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy; import io.metersphere.api.dto.scenario.environment.EnvironmentConfig; -import io.metersphere.service.definition.ApiDefinitionService; -import io.metersphere.base.mapper.plan.TestPlanApiScenarioMapper; -import io.metersphere.commons.utils.GenerateHashTreeUtil; import io.metersphere.base.domain.*; -import io.metersphere.base.mapper.*; +import io.metersphere.base.mapper.ApiScenarioMapper; +import io.metersphere.base.mapper.ApiTestCaseMapper; +import io.metersphere.base.mapper.ApiTestEnvironmentMapper; +import io.metersphere.base.mapper.ProjectMapper; +import io.metersphere.base.mapper.plan.TestPlanApiScenarioMapper; import io.metersphere.commons.constants.ApiRunMode; import io.metersphere.commons.constants.ElementConstants; import io.metersphere.commons.constants.MsTestElementConstants; import io.metersphere.commons.exception.MSException; -import io.metersphere.commons.utils.CommonBeanFactory; -import io.metersphere.commons.utils.JSON; -import io.metersphere.commons.utils.LogUtil; +import io.metersphere.commons.utils.*; import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.environment.service.BaseEnvGroupProjectService; import io.metersphere.environment.service.BaseEnvironmentService; import io.metersphere.i18n.Translator; import io.metersphere.plugin.core.MsTestElement; -import io.metersphere.commons.utils.JSONUtil; +import io.metersphere.service.definition.ApiDefinitionService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -141,7 +140,7 @@ public class ApiScenarioEnvService { MsHTTPSamplerProxy httpSamplerProxy = (MsHTTPSamplerProxy) testElement; if (httpSamplerProxy.isCustomizeReq()) { env.getProjectIds().add(httpSamplerProxy.getProjectId()); - env.setFullUrl(httpSamplerProxy.getIsRefEnvironment() == null ? true : httpSamplerProxy.getIsRefEnvironment()); + env.setFullUrl(httpSamplerProxy.getIsRefEnvironment() == null ? true : !httpSamplerProxy.getIsRefEnvironment()); } else if (!StringUtils.equalsIgnoreCase(httpSamplerProxy.getReferenced(), "Created") || (httpSamplerProxy.getIsRefEnvironment() != null && httpSamplerProxy.getIsRefEnvironment())) { env.getProjectIds().add(httpSamplerProxy.getProjectId()); env.setFullUrl(false);