fix(接口定义): 修复dubbo类型错误问题
This commit is contained in:
parent
d578acc9f2
commit
6b931b9777
|
@ -198,7 +198,6 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
|||
private void convertDubboSample(MsDubboSampler elementNode, DubboSample sampler) {
|
||||
elementNode.setName(sampler.getName());
|
||||
elementNode.setType("DubboSampler");
|
||||
elementNode.setProtocol("dubbo://");
|
||||
elementNode.set_interface(sampler.getPropertyAsString("FIELD_DUBBO_INTERFACE"));
|
||||
elementNode.setMethod(sampler.getPropertyAsString("FIELD_DUBBO_METHOD"));
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class MsDubboSampler extends MsTestElement {
|
|||
private String type = "DubboSampler";
|
||||
|
||||
@JSONField(ordinal = 52)
|
||||
private String protocol = "DUBBO";
|
||||
private final String protocol = "dubbo://";
|
||||
@JsonProperty(value = "interface")
|
||||
@JSONField(ordinal = 53, name = "interface")
|
||||
private String _interface;
|
||||
|
|
|
@ -130,6 +130,9 @@ public class ApiDefinitionService {
|
|||
|
||||
public void create(SaveApiDefinitionRequest request, List<MultipartFile> bodyFiles) {
|
||||
List<String> bodyUploadIds = new ArrayList<>(request.getBodyUploadIds());
|
||||
if (StringUtils.equals(request.getProtocol(), "DUBBO")) {
|
||||
request.setMethod("dubbo://");
|
||||
}
|
||||
createTest(request);
|
||||
FileUtils.createBodyFiles(bodyUploadIds, bodyFiles);
|
||||
}
|
||||
|
@ -140,6 +143,9 @@ public class ApiDefinitionService {
|
|||
}
|
||||
List<String> bodyUploadIds = request.getBodyUploadIds();
|
||||
request.setBodyUploadIds(null);
|
||||
if (StringUtils.equals(request.getProtocol(), "DUBBO")) {
|
||||
request.setMethod("dubbo://");
|
||||
}
|
||||
updateTest(request);
|
||||
FileUtils.createBodyFiles(bodyUploadIds, bodyFiles);
|
||||
}
|
||||
|
@ -618,7 +624,7 @@ public class ApiDefinitionService {
|
|||
return example;
|
||||
}
|
||||
|
||||
private List<String> getAllApiIdsByFontedSelect(Map<String, List<String>> filters, String name, List<String> moduleIds, String projectId, List<String> unSelectIds,String protocol) {
|
||||
private List<String> getAllApiIdsByFontedSelect(Map<String, List<String>> filters, String name, List<String> moduleIds, String projectId, List<String> unSelectIds, String protocol) {
|
||||
ApiDefinitionRequest request = new ApiDefinitionRequest();
|
||||
request.setFilters(filters);
|
||||
request.setName(name);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b9042074b780205e275c674f64417799110519fd
|
||||
Subproject commit 5e0b365f1080197e84055e80071165787e2e79c5
|
|
@ -204,44 +204,44 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {API_STATUS, PRIORITY} from "../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
Assertions,
|
||||
ConstantTimer,
|
||||
Extract,
|
||||
IfController,
|
||||
JSR223Processor,
|
||||
LoopController
|
||||
} from "../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "./Setting";
|
||||
import MsApiCustomize from "./ApiCustomize";
|
||||
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "../../definition/components/environment/ApiEnvironmentConfig";
|
||||
import MsInputTag from "./MsInputTag";
|
||||
import MsRun from "./DebugRun";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsVariableList from "./variable/VariableList";
|
||||
import ApiImport from "../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "./api/ApiRelevance";
|
||||
import ScenarioRelevance from "./api/ScenarioRelevance";
|
||||
import MsComponentConfig from "./component/ComponentConfig";
|
||||
import {handleCtrlSEvent} from "../../../../../common/js/utils";
|
||||
import {API_STATUS, PRIORITY} from "../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
Assertions,
|
||||
ConstantTimer,
|
||||
Extract,
|
||||
IfController,
|
||||
JSR223Processor,
|
||||
LoopController
|
||||
} from "../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "./Setting";
|
||||
import MsApiCustomize from "./ApiCustomize";
|
||||
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "../../definition/components/environment/ApiEnvironmentConfig";
|
||||
import MsInputTag from "./MsInputTag";
|
||||
import MsRun from "./DebugRun";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsVariableList from "./variable/VariableList";
|
||||
import ApiImport from "../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "./api/ApiRelevance";
|
||||
import ScenarioRelevance from "./api/ScenarioRelevance";
|
||||
import MsComponentConfig from "./component/ComponentConfig";
|
||||
import {handleCtrlSEvent} from "../../../../../common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "EditApiScenario",
|
||||
props: {
|
||||
moduleOptions: Array,
|
||||
currentScenario: {},
|
||||
},
|
||||
components: {
|
||||
MsVariableList,
|
||||
ScenarioRelevance,
|
||||
ScenarioApiRelevance,
|
||||
ApiEnvironmentConfig,
|
||||
export default {
|
||||
name: "EditApiScenario",
|
||||
props: {
|
||||
moduleOptions: Array,
|
||||
currentScenario: {},
|
||||
},
|
||||
components: {
|
||||
MsVariableList,
|
||||
ScenarioRelevance,
|
||||
ScenarioApiRelevance,
|
||||
ApiEnvironmentConfig,
|
||||
MsApiReportDetail,
|
||||
MsInputTag, MsRun,
|
||||
MsApiCustomize,
|
||||
|
@ -596,6 +596,9 @@ export default {
|
|||
if (item.protocol) {
|
||||
request.protocol = item.protocol;
|
||||
}
|
||||
if (request.protocol === "DUBBO") {
|
||||
request.protocol = "dubbo://";
|
||||
}
|
||||
request.id = item.id;
|
||||
request.name = item.name;
|
||||
request.refType = refType;
|
||||
|
|
Loading…
Reference in New Issue