From 2eb1818500d4c64298070d4392d709ed96e24829 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Tue, 6 Apr 2021 10:51:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=8E=A7=E6=9D=90=E6=96=99=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=9B=B8=E5=90=8C=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=89=93=E6=88=90zip=E5=8C=85=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../riskbusiness/core/impl/RiskBusinessServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index 23bdc5cbf..0748122e9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -572,13 +572,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo try { String downloadFilename = clientMoniker + "_audit_materials_" + DateFormatUtils.format(new Date(), "dd/MM/yyyy HH:mm:ss").toString() + ".zip"; response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", "attachment;filename=" + downloadFilename); + response.setHeader("Content-Disposition", "attachment;filename="+downloadFilename); ZipOutputStream zos = new ZipOutputStream(response.getOutputStream()); for (int i = 1; i <= 6; i++) { if (riskMaterial.containsKey("file" + i)) { List fileList = (List) riskMaterial.get("file" + i); for (String fileUrl : fileList) { - zos.putNextEntry(new ZipEntry("file" + i + fileUrl.substring(fileUrl.lastIndexOf("/")))); + zos.putNextEntry(new ZipEntry("file" + i +"/"+System.currentTimeMillis()+"_"+fileUrl.substring(fileUrl.lastIndexOf("/")+1))); InputStream inputStream = new URL(fileUrl).openConnection().getInputStream(); byte[] buffer = new byte[1024]; int result = 0;