From a64def2be0a0025e32a5dd068e2ffa0c7c93ee0f Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 26 Oct 2022 14:57:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=E6=97=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E6=97=A7=E6=95=B0=E6=8D=AE=E7=9A=84=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 下载文件时增加对旧数据的过滤 --- .../io/metersphere/metadata/service/FileManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileManagerService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileManagerService.java index a299dfba51..f49eaa78f1 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileManagerService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileManagerService.java @@ -98,7 +98,7 @@ public class FileManagerService { public List downloadFileBatch(List requestList) { List list = new ArrayList<>(); if (CollectionUtils.isNotEmpty(requestList)) { - Map> requestByStorage = requestList.stream().collect(Collectors.groupingBy(FileRequest::getStorage)); + Map> requestByStorage = requestList.stream().filter((e) -> StringUtils.isNotBlank(e.getStorage()) && !StringUtils.equalsIgnoreCase(e.getStorage(), StorageConstants.LOCAL.name())).collect(Collectors.groupingBy(FileRequest::getStorage)); for (Map.Entry> requestByStorageEntry : requestByStorage.entrySet()) { try { list.addAll(FileCenter.getRepository(requestByStorageEntry.getKey()).getFileBatch(requestByStorageEntry.getValue()));