From cae8c9c2ac6b5b9734c6b034640fb9986c337c4c Mon Sep 17 00:00:00 2001 From: wxyclub Date: Mon, 28 Aug 2023 16:19:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug:=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5=E7=9A=84=E2=80=99/?= =?UTF-8?q?=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java b/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java index b66a1ed1..2b261cbb 100644 --- a/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java +++ b/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java @@ -54,6 +54,8 @@ public class AttFileEOServiceImpl extends ServiceImpl i attFileEO = this.getFileInfo(attId); //2020年10月25日 此处补充文件的下载地址 StringBuffer downloadFileUrl = new StringBuffer(); + // 去除downloadURL末尾的 ’/‘ + downloadUrl = downloadUrl.substring(0,downloadUrl.length()-1); downloadFileUrl.append(downloadUrl).append(attFileEO.getFilePath()).append(attFileEO.getFileName()); attFileEO.setDownLoadUrl(downloadFileUrl.toString()); }else{ From 31f3ce66b62307be6e9d43a3ca81f3fae58117e8 Mon Sep 17 00:00:00 2001 From: wxyclub Date: Tue, 29 Aug 2023 10:17:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bug:=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5=E7=9A=84=E2=80=99/?= =?UTF-8?q?=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/adc/da/att/service/impl/AttFileEOServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java b/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java index 2b261cbb..92fcfc9d 100644 --- a/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java +++ b/adc-da-sys/src/main/java/com/adc/da/att/service/impl/AttFileEOServiceImpl.java @@ -55,8 +55,11 @@ public class AttFileEOServiceImpl extends ServiceImpl i //2020年10月25日 此处补充文件的下载地址 StringBuffer downloadFileUrl = new StringBuffer(); // 去除downloadURL末尾的 ’/‘ - downloadUrl = downloadUrl.substring(0,downloadUrl.length()-1); - downloadFileUrl.append(downloadUrl).append(attFileEO.getFilePath()).append(attFileEO.getFileName()); + String url = downloadUrl; + if (url.endsWith("/")) { + url = url.substring(0, url.length() - 1); + } + downloadFileUrl.append(url).append(attFileEO.getFilePath()).append(attFileEO.getFileName()); attFileEO.setDownLoadUrl(downloadFileUrl.toString()); }else{ String fileId = UUIDUtils.randomUUID20();