作者 tangxvhui

调整时区问题

@@ -108,12 +108,12 @@ func (notices *notifySms) checkSendSms() error { @@ -108,12 +108,12 @@ func (notices *notifySms) checkSendSms() error {
108 }() 108 }()
109 logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext}) 109 logSmsRepo := factory.CreateLogSmsRepository(map[string]interface{}{"transactionContext": transactionContext})
110 nowTime := time.Now() 110 nowTime := time.Now()
111 - // nowDay := dayZeroTime(nowTime) 111 + nowDay := dayZeroTime(nowTime)
112 _, logSmsList, err := logSmsRepo.Find(map[string]interface{}{ 112 _, logSmsList, err := logSmsRepo.Find(map[string]interface{}{
113 - "status": string(domain.SmsWait),  
114 - "executeAtEnd": nowTime,  
115 - // "executeAtBegin": nowDay,  
116 - "limit": 1000, 113 + "status": string(domain.SmsWait),
  114 + "executeAtEnd": nowTime,
  115 + "executeAtBegin": nowDay,
  116 + "limit": 1000,
117 }) 117 })
118 if err != nil { 118 if err != nil {
119 return err 119 return err
@@ -169,7 +169,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in @@ -169,7 +169,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in
169 } 169 }
170 //查询第几号日期的数据 170 //查询第几号日期的数据
171 if v, ok := queryOptions["beginDayNumber"]; ok { 171 if v, ok := queryOptions["beginDayNumber"]; ok {
172 - query.Where("date_part('day',staff_assess.begin_time) = ?", v) 172 + query.Where("date_part('day',staff_assess.begin_time at time zone 'PRC') = ?", v)
173 } 173 }
174 174
175 query.Order("staff_assess.id DESC") 175 query.Order("staff_assess.id DESC")