mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
chore: 1
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user