公告结构化
This commit is contained in:
@ -216,14 +216,14 @@ public class WpsController {
|
|||||||
|
|
||||||
if(optional!=null&&optional.get()!=null){
|
if(optional!=null&&optional.get()!=null){
|
||||||
AttachmentDetail detail = optional.get();
|
AttachmentDetail detail = optional.get();
|
||||||
|
|
||||||
List<AttachmentEntity> entityList = detail.get(fileId);
|
List<AttachmentEntity> entityList = detail.get(fileId);
|
||||||
|
if(entityList!=null&&entityList.size()>0) {
|
||||||
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
|
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
|
||||||
fileLength = String.valueOf(optional1.get().length);
|
fileLength = String.valueOf(optional1.get().length);
|
||||||
fileName = entityList.get(0).getFilename();
|
fileName = entityList.get(0).getFilename();
|
||||||
buf = optional1.get();
|
buf = optional1.get();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
// 设置响应的头信息,告诉浏览器文件的大小和下载方式
|
// 设置响应的头信息,告诉浏览器文件的大小和下载方式
|
||||||
|
@ -652,14 +652,13 @@ public class WpsServiceImpl implements WpsService {
|
|||||||
Optional<AttachmentDetail> optional = attachmentClient.findByBusinessId(businessIdList);
|
Optional<AttachmentDetail> optional = attachmentClient.findByBusinessId(businessIdList);
|
||||||
|
|
||||||
if(optional!=null&&optional.get()!=null) {
|
if(optional!=null&&optional.get()!=null) {
|
||||||
|
|
||||||
AttachmentDetail detail = optional.get();
|
AttachmentDetail detail = optional.get();
|
||||||
|
|
||||||
List<AttachmentEntity> entityList = detail.get(id);
|
List<AttachmentEntity> entityList = detail.get(id);
|
||||||
|
if(entityList!=null&&entityList.size()>0) {
|
||||||
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
|
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
|
||||||
return optional1.get();
|
return optional1.get();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return new byte[0];
|
return new byte[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user