fix: 修复邮件变量没有替换的问题
This commit is contained in:
parent
32a723f121
commit
6aa78a33af
|
@ -98,10 +98,11 @@ 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue