Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -60,11 +60,15 @@ public class BizBidClientVersionServiceImpl extends BaseServiceImpl<BizBidClient
|
||||
ExportExceptionEnum.FRAME_EXCEPTION_GET_DOCUMENT_CENTER.customValidName("文档获取失败", !(map.containsKey("message") && map.containsKey("success")) || "null".equals(objectInfo));
|
||||
ExportExceptionEnum.FRAME_EXCEPTION_GET_DOCUMENT_CENTER.customValidName("文档中心返回信息:" + map.get("message").toString(), !(boolean) map.get("success"));
|
||||
Optional<byte[]> optionalBytes = modelConvertor.toByteArray(objectInfo);
|
||||
// log.info("文档中心文件下载返回数据转为byte[]数据:"+ new String(optionalBytes.get()));
|
||||
String data = map.get("data").toString();
|
||||
Map mapdata = (Map) JSON.parse(data);
|
||||
String sysStorageVO = mapdata.get("sysStorageVO").toString();
|
||||
Map mapsysStorageVO = (Map) JSON.parse(sysStorageVO);
|
||||
log.info("文档中心文件下载返回文件大小数据:"+ mapsysStorageVO.get("fileSize"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
// response.setContentType("application/octet-stream;charset=utf-8");
|
||||
response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode("AutoUpdater.xml", "utf-8"));
|
||||
if(optionalBytes.isPresent()){
|
||||
response.setHeader("Content-Length",mapsysStorageVO.get("fileSize").toString());
|
||||
outputStream.write(optionalBytes.get());
|
||||
}
|
||||
outputStream.flush();
|
||||
@ -79,11 +83,15 @@ public class BizBidClientVersionServiceImpl extends BaseServiceImpl<BizBidClient
|
||||
ExportExceptionEnum.FRAME_EXCEPTION_GET_DOCUMENT_CENTER.customValidName("文档获取失败", !(map.containsKey("message") && map.containsKey("success")) || "null".equals(objectInfo));
|
||||
ExportExceptionEnum.FRAME_EXCEPTION_GET_DOCUMENT_CENTER.customValidName("文档中心返回信息:" + map.get("message").toString(), !(boolean) map.get("success"));
|
||||
Optional<byte[]> optionalBytes = modelConvertor.toByteArray(objectInfo);
|
||||
// log.info("文档中心s文件下载返回数据转为byte[]数据:"+ optionalBytes.get());
|
||||
String data = map.get("data").toString();
|
||||
Map mapdata = (Map) JSON.parse(data);
|
||||
String sysStorageVO = mapdata.get("sysStorageVO").toString();
|
||||
Map mapsysStorageVO = (Map) JSON.parse(sysStorageVO);
|
||||
log.info("文档中心s文件下载返回文件大小数据:"+ mapsysStorageVO.get("fileSize"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
// response.setContentType("application/octet-stream;charset=utf-8");
|
||||
response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode("ebtp-ca.zip", "utf-8"));
|
||||
if(optionalBytes.isPresent()){
|
||||
response.setHeader("Content-Length",mapsysStorageVO.get("fileSize").toString());
|
||||
outputStream.write(optionalBytes.get());
|
||||
}
|
||||
outputStream.flush();
|
||||
|
Reference in New Issue
Block a user