Merge branch '1.3.2-bug' into test
正在显示
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 |
@@ -77,8 +79,6 @@ func (notices notifyConfirmEvaluationScore) ifSend(index int) (bool, error) { | @@ -77,8 +79,6 @@ func (notices notifyConfirmEvaluationScore) ifSend(index int) (bool, error) { | ||
77 | //计算下一条短信 | 79 | //计算下一条短信 |
78 | smsMessage := notices.makeNotify(summaryEvaluationData) | 80 | smsMessage := notices.makeNotify(summaryEvaluationData) |
79 | 81 | ||
80 | - nextTime := nowTime.Add(6 * time.Hour) | ||
81 | - smsMessage.ExecuteAt = notices.getTimeExecuteAt(nextTime) | ||
82 | logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) | 82 | logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) |
83 | err = logSmsRepo.Save(smsMessage) | 83 | err = logSmsRepo.Save(smsMessage) |
84 | if err != nil { | 84 | if err != nil { |
-
请 注册 或 登录 后发表评论