预警32
This commit is contained in:
parent
6c85629a37
commit
2067410617
|
|
@ -42,6 +42,7 @@ func (r *ProductRepoImpl) FindWarningBudget(ctx context.Context, fun func(ctx co
|
||||||
Where("end_time > ?", nowTime).
|
Where("end_time > ?", nowTime).
|
||||||
Where("warning_budget > 0").
|
Where("warning_budget > 0").
|
||||||
Where("warning_person IS NOT NULL").
|
Where("warning_person IS NOT NULL").
|
||||||
|
Group("batch_no").
|
||||||
FindInBatches(&results, 5, func(tx *gorm.DB, batch int) error {
|
FindInBatches(&results, 5, func(tx *gorm.DB, batch int) error {
|
||||||
return fun(ctx, r.ToBos(results))
|
return fun(ctx, r.ToBos(results))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue