fix(UI自动化): 修复元素库导入下载模板提示信息展示问题

--bug=1014993 --user=刘瑶 【UI测试】元素库-导入-下载模版-提示信息对应列不对-定位类型建议做成下拉选择 https://www.tapd.cn/55049933/s/1204366
This commit is contained in:
nathan.liu 2022-07-19 16:12:27 +08:00 committed by nathanliu2022
parent 10275df0b3
commit 605e7c763e
4 changed files with 13 additions and 14 deletions

View File

@ -195,7 +195,7 @@
<select id="selectByPrimaryKey" resultType="io.metersphere.base.domain.ModuleNode">
select
<include refid="io.metersphere.base.mapper.TestCaseNodeMapper.Base_Column_List" />
*
from ${tableName}
where id = #{id,jdbcType=VARCHAR}
</select>

View File

@ -73,15 +73,15 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
return module.getId();
}
public String getModulePath(ModuleNode module){
public String getModulePath(ModuleNode module) {
Integer level = module.getLevel();
if( level == null || level <= 1){
return String.format("/%s",module.getName());
if (level == null || level <= 1) {
return String.format("/%s", module.getName());
}
//获取父级信息
if(StringUtils.isNotBlank(module.getParentId())){
if (StringUtils.isNotBlank(module.getParentId())) {
ModuleNode parent = extModuleNodeMapper.selectByPrimaryKey(tableName, module.getParentId());
return parent.getModulePath() + "/" + module.getName();
return parent.getModulePath() + "/" + module.getName();
}
return null;
}
@ -166,7 +166,7 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
}
protected void buildNodeCount(String projectId, List<ModuleNodeDTO> moduleNodes, Function<QueryNodeRequest, List<Map<String, Object>>> getModuleCountFunc,
QueryNodeRequest request) {
QueryNodeRequest request) {
if (request == null) {
request = new QueryNodeRequest();
}
@ -365,7 +365,7 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
moduleNode.setId(UUID.randomUUID().toString());
double pos = getNextLevelPos(projectId, level, pId);
moduleNode.setPos(pos);
extModuleNodeMapper.insert(tableName, moduleNode);
extModuleNodeMapper.insertWithModulePath(tableName, moduleNode);
return moduleNode.getId();
}
@ -429,10 +429,9 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
moduleNode.setId(rootNode.getId());
moduleNode.setLevel(level);
moduleNode.setParentId(pId);
if(level <= 1 && StringUtils.isBlank(parentPath)){
if (level <= 1 && StringUtils.isBlank(parentPath)) {
moduleNode.setModulePath("/" + rootNode.getName());
}
else {
} else {
moduleNode.setModulePath(parentPath + "/" + rootNode.getName());
}
updateNodes.add(moduleNode);
@ -612,7 +611,7 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
return extModuleNodeMapper.selectByExample(tableName, example);
}
public List<ModuleNode> selectByModulePath(ModuleNode node){
public List<ModuleNode> selectByModulePath(ModuleNode node) {
return extModuleNodeMapper.selectByModulePath(tableName, node.getModulePath(), node.getProjectId());
}
}

@ -1 +1 @@
Subproject commit 806edbbea6b2b3fffbb18b8fb83f4d293a1eed34
Subproject commit 9b3c05ac310942814b28e2433339e3303a5366e4

@ -1 +1 @@
Subproject commit d357c326a70088b0827ba1ced1d9cc035866170d
Subproject commit 1a5c65b84fb0c3cdce17b2671e6d80dc4e420337