From 5d166aa419acc1c2467121e730267c6d00015c32 Mon Sep 17 00:00:00 2001 From: nieziyan Date: Thu, 7 Mar 2024 15:27:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/service/impl/SpectrumFileServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java index 75d2f3e7..0d8b0123 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java @@ -62,10 +62,8 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { FileOutputStream fos = null; ZipInputStream zipInputStream = null; String slash = SymbolConstant.SINGLE_SLASH; - //ftp父级路径 - String rootPath = ftpUtil.getFtpRootPath(); //上传文件夹路径 - String filePath = rootPath + spectrumPathProperties.getUploadPath() + slash + username; + String filePath = spectrumPathProperties.getUploadPath() + slash + username; //本地临时文件夹路径 String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash; List fileNames = new ArrayList<>(); @@ -111,7 +109,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { } String fullFilePath = filePath + slash + fileName; FileInputStream local = new FileInputStream(oneFile); - boolean success = ftpClient.storeFile(fullFilePath, local); + boolean success = ftpClient.storeFile(fileName, local); if (!success) failList.add(fullFilePath); } if (CollUtil.isNotEmpty(failList))