From 768ed785a94777c1160fd7314b90391d690bf004 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 4 Dec 2020 18:01:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20me?= =?UTF-8?q?tersphere=20=E6=96=87=E4=BB=B6=E5=AF=BC=E5=85=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/scenario/request/Request.java | 1 - .../metersphere/api/service/ApiDefinitionService.java | 2 ++ .../io/metersphere/api/service/ApiModuleService.java | 11 +++++++++++ frontend/src/business/components/xpack | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/request/Request.java b/backend/src/main/java/io/metersphere/api/dto/scenario/request/Request.java index 7d1d4eb070..a561fa19d9 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/request/Request.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/request/Request.java @@ -22,7 +22,6 @@ import lombok.Data; @JSONType(seeAlso = {HttpRequest.class, DubboRequest.class, SqlRequest.class, TCPRequest.class}, typeKey = "type") @Data public abstract class Request { - private String type; @JSONField(ordinal = 1) private String id; @JSONField(ordinal = 2) 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 ae842472e7..da91ea35cf 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -337,7 +337,9 @@ public class ApiDefinitionService { List data = apiImport.getData(); HashMap> resultMap = apiImport.getResultMap(); resultMap.forEach((module, apiDefinition) -> { +// apiModuleService // apiModuleService.addNode(); + }); for (int i = 0; i < data.size(); i++) { ApiDefinitionResult item = data.get(i); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index a6dd6688d1..1edffcb1a5 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -105,6 +105,17 @@ public class ApiModuleService { return node.getId(); } + public ApiModule getNewModule(String name, String projectId, int level) { + ApiModule node = new ApiModule(); + node.setCreateTime(System.currentTimeMillis()); + node.setUpdateTime(System.currentTimeMillis()); + node.setId(UUID.randomUUID().toString()); + node.setLevel(level); + node.setName(name); + node.setProjectId(projectId); + return node; + } + private void validateNode(ApiModule node) { if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) { throw new RuntimeException(Translator.get("test_case_node_level_tip") diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 8a972a1987..a22a3005d9 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8 +Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a