fix(邮件通知): 优化获取邮件附件,过大时的抛错国际化 (#568)
* fix(邮件通知): 优化获取邮件附件,过大时的抛错国际化 * fix(邮件通知): 优化使用通用的国际化信息 * fix(邮件通知): 代码优化 --------- Co-authored-by: fighter-wang <11291691+fighter-wang@user.noreply.gitee.com>
This commit is contained in:
parent
3ce520ebe6
commit
bf7e19c92e
|
|
@ -154,7 +154,14 @@ public class DefaultEmailNotifier extends AbstractNotifier<EmailTemplate> {
|
|||
|
||||
return Flux
|
||||
.fromIterable(template.getAttachments().entrySet())
|
||||
.flatMap(entry -> Mono.zip(Mono.just(entry.getKey()), convertResource(entry.getValue())))
|
||||
.flatMap(entry -> Mono
|
||||
.zip(Mono.just(entry.getKey()), convertResource(entry.getValue()))
|
||||
.onErrorResume(err -> Mono
|
||||
.error(() -> new BusinessException.NoStackTrace("error.load_attachment_failed",
|
||||
500,
|
||||
entry.getKey(),
|
||||
err.getMessage())))
|
||||
)
|
||||
.flatMap(tp2 -> Mono
|
||||
.fromCallable(() -> {
|
||||
//添加附件
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
error.load_attachment_failed=load attachment [{0}] failed:{1}
|
||||
|
|
@ -0,0 +1 @@
|
|||
error.load_attachment_failed=\u52A0\u8F7D\u9644\u4EF6[{0}]\u5931\u8D25\uFF1A{1}
|
||||
Loading…
Reference in New Issue