作者 tangxvhui

调整时区问题

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