提交 金山pws接口
This commit is contained in:
@ -106,7 +106,6 @@ public class WpsController {
|
|||||||
public BaseResponse<String> getKSFile(@PathVariable String id) {
|
public BaseResponse<String> getKSFile(@PathVariable String id) {
|
||||||
return BaseResponse.success(this.wpsService.getKSWpsFile(id));
|
return BaseResponse.success(this.wpsService.getKSWpsFile(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 沃文档回调-保存文档
|
* 沃文档回调-保存文档
|
||||||
* @param token
|
* @param token
|
||||||
|
@ -482,9 +482,18 @@ public class WpsServiceImpl implements WpsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKSWpsFile(String id){
|
public String getKSWpsFile(String id){
|
||||||
Optional<AttachmentEntity> optional=attachmentClient.findByObjectId(id);
|
|
||||||
|
|
||||||
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(optional.get().getId());
|
List<String> businessIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
businessIdList.add(id);
|
||||||
|
|
||||||
|
Optional<AttachmentDetail> optional = attachmentClient.findByBusinessId(businessIdList);
|
||||||
|
|
||||||
|
AttachmentDetail detail = optional.get();
|
||||||
|
|
||||||
|
List<AttachmentEntity> entityList = detail.get(id);
|
||||||
|
|
||||||
|
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
|
||||||
|
|
||||||
return new String(Base64.getEncoder().encode(optional1.get()));
|
return new String(Base64.getEncoder().encode(optional1.get()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user