fix(测试用例): 导出用例子模块未导出问题
--bug=1046089 --user=王旭 【测试用例】github#32941导出excle格式的用例,导出是选择了所属模块,但是excle中所属模块内容为空 https://www.tapd.cn/55049933/s/1574745
This commit is contained in:
parent
22c5bb9125
commit
dd6a088a92
|
@ -882,7 +882,17 @@ public class FunctionalCaseFileService {
|
||||||
*/
|
*/
|
||||||
private Map<String, String> getModuleMap(String projectId) {
|
private Map<String, String> getModuleMap(String projectId) {
|
||||||
List<BaseTreeNode> moduleTree = functionalCaseModuleService.getTree(projectId);
|
List<BaseTreeNode> moduleTree = functionalCaseModuleService.getTree(projectId);
|
||||||
Map<String, String> moduleMap = moduleTree.stream().collect(Collectors.toMap(BaseTreeNode::getId, BaseTreeNode::getPath));
|
Map<String, String> moduleMap = buildModuleMap(moduleTree, new HashMap());
|
||||||
|
return moduleMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> buildModuleMap(List<BaseTreeNode> moduleTree, Map<String, String> moduleMap) {
|
||||||
|
for (BaseTreeNode treeNode : moduleTree) {
|
||||||
|
moduleMap.put(treeNode.getId(), treeNode.getPath());
|
||||||
|
if (CollectionUtils.isNotEmpty(treeNode.getChildren())) {
|
||||||
|
buildModuleMap(treeNode.getChildren(), moduleMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
return moduleMap;
|
return moduleMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue