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");