Pārlūkot izejas kodu

档案下载修改

master
CMM pirms 1 gada
vecāks
revīzija
fe49d1fa05
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java

+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java Parādīt failu

@@ -292,8 +292,11 @@ public class ProjectFileManage {
// 创建ZipOutputStream
ZipOutputStream zos = new ZipOutputStream(response.getOutputStream());
if (CollUtil.isNotEmpty(fileIdList)) {
// 对文件ID进行去重
HashSet<Long> hashSet = new HashSet<>();
List<Long> fidList = fileIdList.stream().filter(hashSet::add).collect(Collectors.toList());
// 获取文件输入流
for (Long fileId : fileIdList) {
for (Long fileId : fidList) {
File file = fileService.getById(fileId);
// 文件不存在,跳过
if (Objects.isNull(file)) {


Notiek ielāde…
Atcelt
Saglabāt