fix(用例管理): 修复文件上传为路径时更新和复制报错问题

--bug=1036311 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036311
This commit is contained in:
guoyuqi 2024-02-27 15:11:43 +08:00 committed by 刘瑞斌
parent fda527c7fa
commit 88fa490872
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ public class FunctionalCaseAttachmentService {
functionalCaseAttachmentExample.createCriteria().andCaseIdEqualTo(caseId).andFileIdIn(uploadFileIds).andFileSourceEqualTo(fileSource);
List<FunctionalCaseAttachment> existFiles = functionalCaseAttachmentMapper.selectByExample(functionalCaseAttachmentExample);
List<String> existFileIds = existFiles.stream().map(FunctionalCaseAttachment::getFileId).distinct().toList();
List<String> filIds = uploadFileIds.stream().filter(t -> !existFileIds.contains(t)).toList();
List<String> filIds = uploadFileIds.stream().filter(t -> !existFileIds.contains(t) && StringUtils.isNotBlank(t)).toList();
if (CollectionUtils.isEmpty(filIds)) {
return;
}