正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -19,6 +19,8 @@ func (notices notifyConfirmEvaluationScore) from() string { | @@ -19,6 +19,8 @@ func (notices notifyConfirmEvaluationScore) from() string { | ||
19 | } | 19 | } |
20 | 20 | ||
21 | func (notices notifyConfirmEvaluationScore) makeNotify(param *domain.SummaryEvaluation) *domain.LogSms { | 21 | func (notices notifyConfirmEvaluationScore) makeNotify(param *domain.SummaryEvaluation) *domain.LogSms { |
22 | + nextTime := time.Now().Add(6 * time.Hour) | ||
23 | + executeAt := notices.getTimeExecuteAt(nextTime) | ||
22 | newSms := domain.LogSms{ | 24 | newSms := domain.LogSms{ |
23 | Id: 0, | 25 | Id: 0, |
24 | Phone: param.TargetUser.Account, | 26 | Phone: param.TargetUser.Account, |
@@ -32,7 +34,7 @@ func (notices notifyConfirmEvaluationScore) makeNotify(param *domain.SummaryEval | @@ -32,7 +34,7 @@ func (notices notifyConfirmEvaluationScore) makeNotify(param *domain.SummaryEval | ||
32 | Status: domain.SmsWait, | 34 | Status: domain.SmsWait, |
33 | From: notices.from(), | 35 | From: notices.from(), |
34 | Index: param.Id, | 36 | Index: param.Id, |
35 | - ExecuteAt: notices.getTimeExecuteAt(time.Now()), | 37 | + ExecuteAt: executeAt, |
36 | CreatedAt: time.Now(), | 38 | CreatedAt: time.Now(), |
37 | } | 39 | } |
38 | return &newSms | 40 | return &newSms |
@@ -75,8 +77,6 @@ func (notices notifyConfirmEvaluationScore) ifSend(index int) (bool, error) { | @@ -75,8 +77,6 @@ func (notices notifyConfirmEvaluationScore) ifSend(index int) (bool, error) { | ||
75 | //计算下一条短信 | 77 | //计算下一条短信 |
76 | smsMessage := notices.makeNotify(summaryEvaluationData) | 78 | smsMessage := notices.makeNotify(summaryEvaluationData) |
77 | 79 | ||
78 | - nextTime := nowTime.Add(6 * time.Hour) | ||
79 | - smsMessage.ExecuteAt = notices.getTimeExecuteAt(nextTime) | ||
80 | logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) | 80 | logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) |
81 | err = logSmsRepo.Save(smsMessage) | 81 | err = logSmsRepo.Save(smsMessage) |
82 | if err != nil { | 82 | if err != nil { |
-
请 注册 或 登录 后发表评论