openfeign的拦截器增加了cookie消息拦截

This commit is contained in:
ajaxfan
2021-03-24 14:34:50 +08:00
parent 4c583f5ad2
commit 855a611253

View File

@ -72,9 +72,11 @@ public class DefaultAttachmentClient implements AttachmentClient {
// 组织数据存储 // 组织数据存储
modelConvertor.toQueryResult(json).ifPresent(result -> { modelConvertor.toQueryResult(json).ifPresent(result -> {
result.getData().forEach(data -> { Optional.ofNullable(result.getData()).ifPresent(data -> {
detail.add(new AttachmentEntity().setBid(data.getObjectId()).setId(data.getFileId()) data.forEach(item -> {
.setFilename(data.getOriginalName()).setKey(data.getFileName())); detail.add(new AttachmentEntity().setBid(item.getObjectId()).setId(item.getFileId())
.setFilename(item.getOriginalName()).setKey(item.getFileName()));
});
}); });
}); });
return Optional.of(detail); return Optional.of(detail);
@ -212,7 +214,8 @@ public class DefaultAttachmentClient implements AttachmentClient {
public Optional<UploadObject> upload(@NotNull String businessId, @NotNull String filename, @NotNull byte[] array) { public Optional<UploadObject> upload(@NotNull String businessId, @NotNull String filename, @NotNull byte[] array) {
removeDuplicateObject(businessId, filename); removeDuplicateObject(businessId, filename);
String res = documentCenterService.upload("ebtp-mall-cloud", businessId, fileConvertor.toMultipartFile(filename, array)); String res = documentCenterService.upload("ebtp-mall-cloud", businessId,
fileConvertor.toMultipartFile(filename, array));
log.info("document center upload result: {}", res); log.info("document center upload result: {}", res);