fix(UI自动化): 修复元素库模块路径问题

--story=1007525 --user=刘瑶 【UI测试】元素库优化 https://www.tapd.cn/55049933/s/1203207
This commit is contained in:
nathan.liu 2022-07-18 13:13:05 +08:00 committed by jianxing
parent f1c0cf5474
commit 7bfe186d95
5 changed files with 18 additions and 4 deletions

View File

@ -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);

View File

@ -70,6 +70,16 @@
</trim>
</insert>
<insert id="insert">
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>
<insert id="insertWithModulePath">
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},
<if test="record.modulePath != null">
`module_path` = #{record.modulePath,jdbcType=VARCHAR},
</if>
parent_id = #{record.parentId,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=BIGINT},

View File

@ -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);

@ -1 +1 @@
Subproject commit ff5b6db69dd600fb7c68db33256e01efdd51e705
Subproject commit fcfe1200cffcd15d8079aa0386fedc9d489f5fe7

@ -1 +1 @@
Subproject commit 9b9233d775b00461cc29a537243ff391fe0bf2e8
Subproject commit b8ec7e7e2cf2d0a7dba138f7895428298652cac2