消息通知-未定义通知模板或模板不存使用默认模板
This commit is contained in:
@@ -63,6 +63,16 @@ func NotifyTplAdd(obj *NotifyTpl) (int64, error) {
|
||||
return orm.NewOrm().Insert(obj)
|
||||
}
|
||||
|
||||
func NotifyTplGetByTplType(tpl_type int, typestr string) (NotifyTpl, error) {
|
||||
var list NotifyTpl
|
||||
err := orm.NewOrm().QueryTable(TableName("notify_tpl")).Filter("type", typestr).Filter("tpl_type", tpl_type).Filter("status", 1).Limit(1).One(&list)
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func NotifyTplGetById(id int) (*NotifyTpl, error) {
|
||||
obj := &NotifyTpl{
|
||||
Id: id,
|
||||
|
||||
Reference in New Issue
Block a user