diff --git a/internal/data/repoimpl/product.go b/internal/data/repoimpl/product.go index 336d490..5f92646 100644 --- a/internal/data/repoimpl/product.go +++ b/internal/data/repoimpl/product.go @@ -38,8 +38,8 @@ func (r *ProductRepoImpl) FindWarningBudget(ctx context.Context, fun func(ctx co nowTime := time.Now().Format(time.DateTime) result := r.db.DB(ctx). - Where("start_time <= ?", nowTime). - Where("start_time <= ?", nowTime). + Where("start_time < ?", nowTime). + Where("end_time > ?", nowTime). Where("warning_budget > 0"). Where("warning_person IS NOT NULL"). FindInBatches(&results, 5, func(tx *gorm.DB, batch int) error {