Explorar el Código

档案下载修改

master
CMM hace 1 año
padre
commit
fe49d1fa05
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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 Ver fichero

@@ -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)) {


Cargando…
Cancelar
Guardar