fix: 修复邮件变量没有替换的问题

This commit is contained in:
wenyann 2020-09-24 17:51:12 +08:00
parent 32a723f121
commit 6aa78a33af
1 changed files with 2 additions and 1 deletions

View File

@ -98,8 +98,9 @@ public class MailService {
private String getContent(String template, Map<String, String> context) {
if (MapUtils.isNotEmpty(context)) {
for (String k : context.keySet()) {
if (StringUtils.isNotBlank(context.get(k)))
if (StringUtils.isNotBlank(context.get(k))) {
template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", context.get(k));
}
}
}
return template;