run.go
759 字节
package notify
import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
var TaskSmsNotify *notifySms
func RunTaskSmsNotify() {
newSmsNotify := notifySms{}
newSmsNotify.regist(notifyStaffAssess{})
newSmsNotify.regist(notifySummaryEvaluation{})
newSmsNotify.runTask()
}
// 每日自评短信通知 ,预创建待发送的短信消息
func AddNotifyStaffAssess(param *domain.StaffAssess) {
newNotify := notifyStaffAssess{}
newSms := newNotify.makeNotify(param)
TaskSmsNotify.addTask(newSms)
}
// 周期自评短信通知 ,预创建待发送的短信消息
func AddNotifySummaryEvaluation(param *domain.SummaryEvaluation) {
newNotify := notifySummaryEvaluation{}
newSms := newNotify.makeNotify(param)
TaskSmsNotify.addTask(newSms)
}