run.go 815 字节
package notify

import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"

var taskSmsNotify *notifySms

// 检查并发送短信通知
func RunTaskSmsNotify() {
	taskSmsNotify = &notifySms{}
	taskSmsNotify.init()
	taskSmsNotify.regist(notifyStaffAssess{})
	taskSmsNotify.regist(notifySummaryEvaluation{})
	taskSmsNotify.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)
}