fix(用例管理): 导出excel用例模块问题

--bug=1050742 --user=王旭 【用例管理】导出用例为excel-模块导出错误 https://www.tapd.cn/55049933/s/1635925
This commit is contained in:
WangXu10 2024-12-24 13:42:19 +08:00 committed by Craftsman
parent d6788b5f32
commit bd143468b5
1 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,11 @@ public class FunctionalCaseModuleService extends ModuleTreeService {
public List<BaseTreeNode> getTree(String projectId) {
List<BaseTreeNode> functionalModuleList = extFunctionalCaseModuleMapper.selectBaseByProjectId(projectId);
functionalModuleList.forEach(baseTreeNode -> {
if (StringUtils.equalsIgnoreCase(baseTreeNode.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
baseTreeNode.setPath(baseTreeNode.getPath() + baseTreeNode.getName());
}
});
return super.buildTreeAndCountResource(functionalModuleList, true, Translator.get("functional_case.module.default.name"));
}