作者 Your Name

修改bug

@@ -3,12 +3,13 @@ package repository @@ -3,12 +3,13 @@ package repository
3 import ( 3 import (
4 "errors" 4 "errors"
5 "fmt" 5 "fmt"
  6 + "time"
  7 +
6 "github.com/go-pg/pg/v10" 8 "github.com/go-pg/pg/v10"
7 pgTransaction "github.com/linmadan/egglib-go/transaction/pg" 9 pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
8 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" 10 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
9 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/pg/models" 11 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/pg/models"
10 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/utils" 12 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/utils"
11 - "time"  
12 ) 13 )
13 14
14 type NodeTaskRepository struct { 15 type NodeTaskRepository struct {
@@ -127,7 +128,6 @@ func (repo *NodeTaskRepository) Find(queryOptions map[string]interface{}) ([]*do @@ -127,7 +128,6 @@ func (repo *NodeTaskRepository) Find(queryOptions map[string]interface{}) ([]*do
127 query := tx.Model(&m).Where("deleted_at isnull") 128 query := tx.Model(&m).Where("deleted_at isnull")
128 129
129 if v, ok := queryOptions["now"].(time.Time); ok { 130 if v, ok := queryOptions["now"].(time.Time); ok {
130 - query.Where("next_sent_at isnull")  
131 query.Where("next_sent_at <= ?", v) 131 query.Where("next_sent_at <= ?", v)
132 } 132 }
133 133