ZQN
2024-08-14 5cbb2e7fc3d81ac895548179a7be9a65fa726c6d
project-common/src/main/java/com/project/common/utils/zip/ZipUtils.java
@@ -27,7 +27,7 @@
     * @param list 图片数组
     * @param response  响应
     */
    public static void downloadToZip(List<String> list, HttpServletResponse response)
    public static void downloadToZip(List<String> list, List<String> names, HttpServletResponse response)
    {
        int i = 0;
        //如果有附件 进行zip处理
@@ -43,7 +43,7 @@
                    InputStream ins = Files.newInputStream(Paths.get(localPath + s));
                    //塞入流数组中
                    srcFiles[i] = ins;
                    srcFileNames[i] = path.substring(path.lastIndexOf("/",path.lastIndexOf("-")));
                    srcFileNames[i] = names.get(list.indexOf(path))+".png";
                    i++;
                }
                response.setCharacterEncoding("UTF-8");