fix(测试跟踪): 回收站删除用例报错

This commit is contained in:
AgAngle 2023-10-25 18:22:31 +08:00 committed by 刘瑞斌
parent 33f0719090
commit 9b39bfadc9
1 changed files with 3 additions and 0 deletions

View File

@ -194,6 +194,9 @@ public class MdFileService {
* @param resourceIds * @param resourceIds
*/ */
public void deleteBySourceIds(List<String> resourceIds) { public void deleteBySourceIds(List<String> resourceIds) {
if (CollectionUtils.isEmpty(resourceIds)) {
return;
}
// 查询文件是否被其他资源引用 // 查询文件是否被其他资源引用
List<FileAssociation> deleteFileAssociations = fileAssociationService.getByResourceIds(resourceIds); List<FileAssociation> deleteFileAssociations = fileAssociationService.getByResourceIds(resourceIds);
List<String> fileNames = deleteFileAssociations.stream().map(FileAssociation::getFileMetadataId).toList(); List<String> fileNames = deleteFileAssociations.stream().map(FileAssociation::getFileMetadataId).toList();