公告结构化

This commit is contained in:
zhangqinbin
2023-12-12 13:38:46 +08:00
parent a2b8c918eb
commit 4bf04013e3
2 changed files with 10 additions and 11 deletions

View File

@ -216,14 +216,14 @@ public class WpsController {
if(optional!=null&&optional.get()!=null){
AttachmentDetail detail = optional.get();
List<AttachmentEntity> entityList = detail.get(fileId);
if(entityList!=null&&entityList.size()>0) {
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
fileLength = String.valueOf(optional1.get().length);
fileName = entityList.get(0).getFilename();
buf = optional1.get();
}
}
try{
// 设置响应的头信息,告诉浏览器文件的大小和下载方式

View File

@ -652,14 +652,13 @@ public class WpsServiceImpl implements WpsService {
Optional<AttachmentDetail> optional = attachmentClient.findByBusinessId(businessIdList);
if(optional!=null&&optional.get()!=null) {
AttachmentDetail detail = optional.get();
List<AttachmentEntity> entityList = detail.get(id);
if(entityList!=null&&entityList.size()>0) {
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
return optional1.get();
}
}
return new byte[0];
}