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 + + + +