正在显示
2 个修改的文件
包含
10 行增加
和
0 行删除
| @@ -43,6 +43,11 @@ func (notices notifyStaffAssess) makeNotify(param *domain.StaffAssess) *domain.L | @@ -43,6 +43,11 @@ func (notices notifyStaffAssess) makeNotify(param *domain.StaffAssess) *domain.L | ||
| 43 | 43 | ||
| 44 | // ifSend 确认是否发送通知 | 44 | // ifSend 确认是否发送通知 |
| 45 | func (notices notifyStaffAssess) ifSend(index int) (bool, error) { | 45 | func (notices notifyStaffAssess) ifSend(index int) (bool, error) { |
| 46 | + nowDay := time.Now().Weekday() | ||
| 47 | + if nowDay == time.Sunday || nowDay == time.Saturday { | ||
| 48 | + //周末不发 | ||
| 49 | + return false, nil | ||
| 50 | + } | ||
| 46 | transactionContext, err := factory.CreateTransactionContext(nil) | 51 | transactionContext, err := factory.CreateTransactionContext(nil) |
| 47 | if err != nil { | 52 | if err != nil { |
| 48 | return false, err | 53 | return false, err |
| @@ -44,6 +44,11 @@ func (notices notifySummaryEvaluation) makeNotify(param *domain.SummaryEvaluatio | @@ -44,6 +44,11 @@ func (notices notifySummaryEvaluation) makeNotify(param *domain.SummaryEvaluatio | ||
| 44 | 44 | ||
| 45 | // ifSend 确认是否发送通知 | 45 | // ifSend 确认是否发送通知 |
| 46 | func (notices notifySummaryEvaluation) ifSend(index int) (bool, error) { | 46 | func (notices notifySummaryEvaluation) ifSend(index int) (bool, error) { |
| 47 | + nowDay := time.Now().Weekday() | ||
| 48 | + if nowDay == time.Sunday || nowDay == time.Saturday { | ||
| 49 | + //周末不发 | ||
| 50 | + return false, nil | ||
| 51 | + } | ||
| 47 | transactionContext, err := factory.CreateTransactionContext(nil) | 52 | transactionContext, err := factory.CreateTransactionContext(nil) |
| 48 | if err != nil { | 53 | if err != nil { |
| 49 | return false, err | 54 | return false, err |
-
请 注册 或 登录 后发表评论