diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.java index ff9dc1feeb..b5a526c5ba 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.java @@ -24,6 +24,8 @@ public interface ExtModuleNodeMapper { void insert(@Param("tableName") String tableName, @Param("record") ModuleNode record); + void insertWithModulePath(@Param("tableName") String tableName, @Param("record") ModuleNode record); + ModuleNodeDTO get(@Param("tableName") String tableName, @Param("id") String id); void updatePos(@Param("tableName") String tableName, @Param("id") String id, @Param("pos") Double pos); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml index 1ec150c893..e597b753cc 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml @@ -70,6 +70,16 @@ + insert into ${tableName} (id, project_id, `name`, + parent_id, `level`, create_time, + update_time, pos, create_user + ) + values (#{record.id,jdbcType=VARCHAR}, #{record.projectId,jdbcType=VARCHAR}, #{record.name,jdbcType=VARCHAR}, + #{record.parentId,jdbcType=VARCHAR}, #{record.level,jdbcType=INTEGER}, #{record.createTime,jdbcType=BIGINT}, + #{record.updateTime,jdbcType=BIGINT}, #{record.pos,jdbcType=DOUBLE}, #{record.createUser,jdbcType=VARCHAR} + ) + + insert into ${tableName} (id, project_id, `name`, module_path, parent_id, `level`, create_time, update_time, pos, create_user @@ -123,7 +133,9 @@ update ${tableName} set project_id = #{record.projectId,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, - `module_path` = #{record.modulePath,jdbcType=VARCHAR}, + + `module_path` = #{record.modulePath,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, `level` = #{record.level,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=BIGINT}, diff --git a/backend/src/main/java/io/metersphere/service/ProjectService.java b/backend/src/main/java/io/metersphere/service/ProjectService.java index 264b382420..4260c8df24 100644 --- a/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -266,7 +266,7 @@ public class ProjectService { extModuleNodeMapper.insert(ProjectModuleDefaultNodeEnum.UI_SCENARIO_DEFAULT_NODE.getTableName(), record); record.setId(UUID.randomUUID().toString()); record.setName(ProjectModuleDefaultNodeEnum.UI_ELEMENT_DEFAULT_NODE.getNodeName()); - extModuleNodeMapper.insert(ProjectModuleDefaultNodeEnum.UI_ELEMENT_DEFAULT_NODE.getTableName(), record); + extModuleNodeMapper.insertWithModulePath(ProjectModuleDefaultNodeEnum.UI_ELEMENT_DEFAULT_NODE.getTableName(), record); ApiModule apiRecord = new ApiModule(); BeanUtils.copyBean(apiRecord, record); diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index ff5b6db69d..fcfe1200cf 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit ff5b6db69dd600fb7c68db33256e01efdd51e705 +Subproject commit fcfe1200cffcd15d8079aa0386fedc9d489f5fe7 diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 9b9233d775..b8ec7e7e2c 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 9b9233d775b00461cc29a537243ff391fe0bf2e8 +Subproject commit b8ec7e7e2cf2d0a7dba138f7895428298652cac2