From 9dcbaae2b5b84a9f35a8b35f3d1975309af69b71 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 13 Nov 2023 15:06:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=96=B0=E5=A2=9E=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1013573 --user=郭雨琦 https://www.tapd.cn/55049933/prong/stories/view/1155049933001013573 --- .../frontend/src/api/file-metadata.js | 5 +++ .../base/mapper/ext/BaseFileModuleMapper.java | 2 ++ .../base/mapper/ext/BaseFileModuleMapper.xml | 10 ++++++ .../controller/FileModuleController.java | 6 ++++ .../metadata/service/FileModuleService.java | 36 +++++++++++++++++-- 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/framework/sdk-parent/frontend/src/api/file-metadata.js b/framework/sdk-parent/frontend/src/api/file-metadata.js index b6e9881fff..dee75364e7 100644 --- a/framework/sdk-parent/frontend/src/api/file-metadata.js +++ b/framework/sdk-parent/frontend/src/api/file-metadata.js @@ -11,6 +11,11 @@ export function getFileModules(projectId) { return get(url); } +export function getTypeNodeByProjectId(projectId, moduleType) { + let url = '/file/module/type/list/' + projectId + "/" + moduleType; + return get(url); +} + export function getMetadataTypes() { let url = '/file/metadata/get/type/all'; return get(url); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.java index 4080c1e1d7..3383b6ebac 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.java @@ -11,6 +11,8 @@ public interface BaseFileModuleMapper { List getNodeTreeByProjectId(@Param("projectId") String projectId); + List getTypeNodeTreeByProjectId(@Param("projectId") String projectId, @Param("moduleType") String moduleType); + void updatePos(String id, Double pos); String getNameById(String moduleId); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.xml b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.xml index d029d70989..a8a9c783f1 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.xml +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseFileModuleMapper.xml @@ -17,6 +17,16 @@ where file_module.project_id = #{projectId} order by file_module.pos asc + + + +