From d0549fa12df180abaf2244ef507977bd88ad29ed Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Thu, 25 Mar 2021 15:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=96=87=E4=BB=B6=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sevice/impl/BizBidClientVersionServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java index 2584a3e..006834f 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java @@ -3,6 +3,7 @@ package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.chinaunicom.ebtp.mall.cloud.attachment.sdk.convertor.ModelConvertor; +import com.chinaunicom.mall.ebtp.common.util.JsonUtils; import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService; import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidClientVersion; import lombok.RequiredArgsConstructor; @@ -42,11 +43,18 @@ public class BizBidClientVersionServiceImpl extends BaseServiceImpl optionalBytes = modelConvertor.toByteArray(documentCenterService.getObjectDetail(objectId)); + log.info("文档中心文件下载传入数据:"+ JsonUtils.objectToJson(objectId)); + String objectInfo = documentCenterService.getObjectDetail(objectId); + log.info("文档中心文件下载返回数据:"+ JsonUtils.objectToJson(objectInfo)); + Optional optionalBytes = modelConvertor.toByteArray(objectInfo); + log.info("文档中心文件下载返回数据转为byte[]数据:"+ JsonUtils.objectToJson(optionalBytes)); FileOutputStream fileOutputStream = null; if(optionalBytes.isPresent()){ ByteArrayOutputStream fileStream = new ByteArrayOutputStream(); + fileStream.write(optionalBytes.get()); + log.info("文档中心文件下载返回数据转为ByteArrayOutputStream数据:"+ JsonUtils.objectToJson(fileStream)); fileOutputStream.write(fileStream.toByteArray()); + log.info("文档中心文件下载返回数据转为ByteArrayOutputStream数据:"+ JsonUtils.objectToJson(fileOutputStream)); } return fileOutputStream; }