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; }