From 0a2137949bd6c6504994d32e33c62b06243f81ff Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Fri, 22 Dec 2023 09:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E4=BC=81WPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/ebtp/extend/wps/controller/WpsController.java | 10 ++++++---- .../ebtp/extend/wps/service/impl/WpsServiceImpl.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/controller/WpsController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/controller/WpsController.java index ba915d4..2dbae2e 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/controller/WpsController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/controller/WpsController.java @@ -303,10 +303,12 @@ public class WpsController { List entityList = detail.get(fileId[0]); if(entityList!=null&&entityList.size()>0) { Optional optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId()); - fileLength = String.valueOf(optional1.get().length); - fileName = entityList.get(0).getFilename(); - buf = optional1.get(); - uploadB = false; + if(optional1!=null) { + fileLength = String.valueOf(optional1.get().length); + fileName = entityList.get(0).getFilename(); + buf = optional1.get(); + uploadB = false; + } } } if(uploadB){ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/service/impl/WpsServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/service/impl/WpsServiceImpl.java index 418fed1..76583e8 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/service/impl/WpsServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/wps/service/impl/WpsServiceImpl.java @@ -714,7 +714,7 @@ public class WpsServiceImpl implements WpsService { } if(uploadB){ buf = uploadTempFile(fileExtension); - Optional op=attachmentClient.upload(id,fileName,buf); + //Optional op=attachmentClient.upload(id,fileName,buf); } return buf; }