From 810a72b47fef1349bc0a11a11211342204f8f807 Mon Sep 17 00:00:00 2001 From: mashuai Date: Mon, 24 Mar 2025 14:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/sgzb/system/service/impl/SysFileServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysFileServiceImpl.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysFileServiceImpl.java index 5610094..0afcf60 100644 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysFileServiceImpl.java +++ b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysFileServiceImpl.java @@ -96,6 +96,7 @@ public class SysFileServiceImpl implements SysFileService { file.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()); file.setCreateTime(new Date()); dao.insertFileInfo(file); + log.info("文件对象:#{}", file); } } catch (Exception e) { e.printStackTrace(); @@ -161,6 +162,7 @@ public class SysFileServiceImpl implements SysFileService { String tmpName = multipartFile.getOriginalFilename(); tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1); tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() + tmpName.substring(tmpName.lastIndexOf("."), tmpName.length()); + log.error("完整路径 IE:#{}" , tmpName); String imageFiles = localFilePath + fileType + "/"; String os = System.getProperty("os.name"); if (os.toLowerCase().startsWith(GlobalConstants.STRING_WIN)) { @@ -176,6 +178,7 @@ public class SysFileServiceImpl implements SysFileService { file.getParentFile().mkdirs(); } url = "/" + fileType + "/" + year + "/" + month + "/" + day + "/" + tmpName; + log.error("文件保存路径:#{}" , url); if (!multipartFile.isEmpty()) { try { FileOutputStream fos = new FileOutputStream(file);