You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
664 B
24 lines
664 B
package dao |
|
|
|
import ( |
|
"go-common/app/admin/ep/merlin/model" |
|
|
|
pkgerr "github.com/pkg/errors" |
|
) |
|
|
|
// InsertMailLog insert mail log. |
|
func (d *Dao) InsertMailLog(ml *model.MailLog) (err error) { |
|
return pkgerr.WithStack(d.db.Create(&ml).Error) |
|
} |
|
|
|
// DelMailLog delete mail log. |
|
func (d *Dao) DelMailLog(receiverName string) (err error) { |
|
err = pkgerr.WithStack(d.db.Where("receiver_name=?", receiverName).Delete(model.MailLog{}).Error) |
|
return |
|
} |
|
|
|
// FindMailLog find mail log. |
|
func (d *Dao) FindMailLog(receiverName string) (mailLogs []*model.MailLog, err error) { |
|
err = pkgerr.WithStack(d.db.Where("receiver_name=?", receiverName).Find(&mailLogs).Error) |
|
return |
|
}
|
|
|