消息通知-未定义通知模板或模板不存使用默认模板
This commit is contained in:
@@ -305,7 +305,13 @@ func (j *Job) Run() {
|
||||
var title = ""
|
||||
var content = ""
|
||||
notifyTpl, err := models.NotifyTplGetById(j.task.NotifyTplId)
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
notifyTpl, err := models.NotifyTplGetByTplType(j.task.NotifyType, "system")
|
||||
if err == nil {
|
||||
title = notifyTpl.Title
|
||||
content = notifyTpl.Content
|
||||
}
|
||||
} else {
|
||||
title = notifyTpl.Title
|
||||
content = notifyTpl.Content
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user