fix(接口测试): 下载文件时增加对旧数据的过滤

下载文件时增加对旧数据的过滤
This commit is contained in:
song-tianyang 2022-10-26 14:57:24 +08:00 committed by 刘瑞斌
parent e3fbe59afb
commit a64def2be0
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ public class FileManagerService {
public List<FileInfoDTO> downloadFileBatch(List<FileRequest> requestList) {
List<FileInfoDTO> list = new ArrayList<>();
if (CollectionUtils.isNotEmpty(requestList)) {
Map<String, List<FileRequest>> requestByStorage = requestList.stream().collect(Collectors.groupingBy(FileRequest::getStorage));
Map<String, List<FileRequest>> requestByStorage = requestList.stream().filter((e) -> StringUtils.isNotBlank(e.getStorage()) && !StringUtils.equalsIgnoreCase(e.getStorage(), StorageConstants.LOCAL.name())).collect(Collectors.groupingBy(FileRequest::getStorage));
for (Map.Entry<String, List<FileRequest>> requestByStorageEntry : requestByStorage.entrySet()) {
try {
list.addAll(FileCenter.getRepository(requestByStorageEntry.getKey()).getFileBatch(requestByStorageEntry.getValue()));