From d09f4043a2675e2b155e98aaeb822a23dc35398e Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Mon, 29 Aug 2022 15:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=97=B6=E9=AA=8C=E8=AF=81=E8=B7=AF=E5=BE=84=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/utils/file/FileUploadUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index cf27e96..2a1ea0a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -283,6 +283,8 @@ public class FileUploadUtils String codeName = UUID.randomUUID().toString();// 二维码的图片名 String imageType = "jpg";// 图片类型 picPath = DateUtils.datePath() + "/" + codeName + "." + imageType; + // 判断文件夹是否存在,不存在时新建文件夹 + getAbsoluteFile(path, picPath).getAbsolutePath(); MultiFormatWriter multiFormatWriter = new MultiFormatWriter(); Map hints = new HashMap(); hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");