This commit is contained in:
xiaojunnuo
2026-01-30 17:10:31 +08:00
parent 9bee0e460b
commit cdd5ad3a8e
@@ -159,15 +159,13 @@ export class EmailService implements IEmailService {
let content = null let content = null
const emailConf = await this.sysSettingsService.getSetting<SysEmailConf>(SysEmailConf); const emailConf = await this.sysSettingsService.getSetting<SysEmailConf>(SysEmailConf);
const template = emailConf?.templates?.[req.type] const template = emailConf?.templates?.[req.type]
if (template && isPlus()) { if (isPlus() && template && template.addonId) {
if (template.addonId) { const addon: ITemplateProvider<EmailContent> = await this.addonGetterService.getAddonById(template.addonId, true, 0)
const addon: ITemplateProvider<EmailContent> = await this.addonGetterService.getAddonById(template.addonId, true, 0) if (addon) {
if (addon) { content = await addon.buildContent({ data: req.data })
content = await addon.buildContent({ data: req.data })
}
} }
} }
if (!content && isPlus()) { if (isPlus() && !content ) {
//看看有没有通用模版 //看看有没有通用模版
if (emailConf?.templates?.common && emailConf?.templates?.common.addonId) { if (emailConf?.templates?.common && emailConf?.templates?.common.addonId) {
const addon: ITemplateProvider<EmailContent> = await this.addonGetterService.getAddonById(emailConf.templates.common.addonId, true, 0) const addon: ITemplateProvider<EmailContent> = await this.addonGetterService.getAddonById(emailConf.templates.common.addonId, true, 0)