审查视图

pkg/application/notify/run.go 815 字节
tangxvhui authored
1 2 3 4
package notify

import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
tangxvhui authored
5
var taskSmsNotify *notifySms
tangxvhui authored
6
tangxvhui authored
7
// 检查并发送短信通知
tangxvhui authored
8
func RunTaskSmsNotify() {
tangxvhui authored
9 10 11 12 13
	taskSmsNotify = &notifySms{}
	taskSmsNotify.init()
	taskSmsNotify.regist(notifyStaffAssess{})
	taskSmsNotify.regist(notifySummaryEvaluation{})
	taskSmsNotify.runTask()
tangxvhui authored
14 15 16 17 18 19 20

}

// 每日自评短信通知 ,预创建待发送的短信消息
func AddNotifyStaffAssess(param *domain.StaffAssess) {
	newNotify := notifyStaffAssess{}
	newSms := newNotify.makeNotify(param)
tangxvhui authored
21
	taskSmsNotify.addTask(newSms)
tangxvhui authored
22 23 24 25 26 27
}

// 周期自评短信通知 ,预创建待发送的短信消息
func AddNotifySummaryEvaluation(param *domain.SummaryEvaluation) {
	newNotify := notifySummaryEvaluation{}
	newSms := newNotify.makeNotify(param)
tangxvhui authored
28
	taskSmsNotify.addTask(newSms)
tangxvhui authored
29
}