...
|
...
|
@@ -23,7 +23,8 @@ func CheckYesterdayTaskRecord() { |
|
|
timer := time.NewTimer(interval)
|
|
|
for {
|
|
|
<-timer.C
|
|
|
taskRecordList, err := getYesterdayTaskRecord()
|
|
|
nowDay := time.Now().Format("2006-01-02")
|
|
|
taskRecordList, err := getYesterdayTaskRecord(nowDay)
|
|
|
if err != nil {
|
|
|
log.Logger.Info("获取每日任务反馈" + err.Error())
|
|
|
}
|
...
|
...
|
@@ -77,7 +78,7 @@ func checkTaskRecord(param *domain.TaskRecord) error { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func getYesterdayTaskRecord() ([]*domain.TaskRecord, error) {
|
|
|
func getYesterdayTaskRecord(nowDay string) ([]*domain.TaskRecord, error) {
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, err
|
...
|
...
|
@@ -89,7 +90,7 @@ func getYesterdayTaskRecord() ([]*domain.TaskRecord, error) { |
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
nowDay := time.Now().Format("2006-01-02")
|
|
|
// nowDay := time.Now().Format("2006-01-02")
|
|
|
nowDayTime, _ := time.ParseInLocation("2006-01-02", nowDay, time.Local)
|
|
|
yesterday := nowDayTime.Add(-23 * time.Hour).Format("2006-01-02")
|
|
|
|
...
|
...
|
|