fix(用例管理): 修复用例评论无法回复问题

--bug=1035920 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001035920
This commit is contained in:
guoyuqi 2024-02-27 19:29:28 +08:00 committed by Craftsman
parent 8bdd2cd2d3
commit 16d88a4db3
1 changed files with 5 additions and 1 deletions

View File

@ -277,7 +277,11 @@ public class FunctionalCaseCommentService {
Map<String, List<FunctionalCaseCommentDTO>> commentMap = replyList.stream().collect(Collectors.groupingBy(FunctionalCaseComment::getParentId));
for (FunctionalCaseCommentDTO functionalCaseComment : rootList) {
List<FunctionalCaseCommentDTO> replyComments = commentMap.get(functionalCaseComment.getId());
functionalCaseComment.setChildComments(replyComments);
if (CollectionUtils.isNotEmpty(replyComments)) {
functionalCaseComment.setChildComments(replyComments);
} else {
functionalCaseComment.setChildComments(new ArrayList<>());
}
}
return rootList;
}