作者 tangxvhui

调整

@@ -110,11 +110,12 @@ func (notices *notifySms) checkSendSms() error { @@ -110,11 +110,12 @@ func (notices *notifySms) checkSendSms() error {
110 }() 110 }()
111 logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) 111 logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext})
112 nowTime := time.Now() 112 nowTime := time.Now()
113 - // nowDay := dayZeroTime(nowTime) 113 + nowDay := dayZeroTime(nowTime)
114 _, logSmsList, err := logSmsRepo.Find(map[string]interface{}{ 114 _, logSmsList, err := logSmsRepo.Find(map[string]interface{}{
115 - "status": string(domain.SmsWait),  
116 - "executeAtEnd": nowTime,  
117 - "limit": 1000, 115 + "status": string(domain.SmsWait),
  116 + "executeAtEnd": nowTime,
  117 + "executeAtBegin": nowDay,
  118 + "limit": 1000,
118 }) 119 })
119 if err != nil { 120 if err != nil {
120 return err 121 return err
@@ -4,8 +4,6 @@ import ( @@ -4,8 +4,6 @@ import (
4 "bytes" 4 "bytes"
5 "encoding/json" 5 "encoding/json"
6 "errors" 6 "errors"
7 - "fmt"  
8 - "io"  
9 "net/http" 7 "net/http"
10 "time" 8 "time"
11 9
@@ -57,8 +55,6 @@ func (ssrv SmsService) SendNoticeSms(phone string, tplId int, tplValues map[stri @@ -57,8 +55,6 @@ func (ssrv SmsService) SendNoticeSms(phone string, tplId int, tplValues map[stri
57 jDecoder := json.NewDecoder(resp.Body) 55 jDecoder := json.NewDecoder(resp.Body)
58 err = jDecoder.Decode(&result) 56 err = jDecoder.Decode(&result)
59 if err != nil { 57 if err != nil {
60 - bt, _ := io.ReadAll(resp.Body)  
61 - fmt.Println(string(bt))  
62 return err 58 return err
63 } 59 }
64 if result.Code != 0 { 60 if result.Code != 0 {