通知查询检索调整
This commit is contained in:
parent
eb10f82c4c
commit
418ab72562
|
|
@ -54,6 +54,8 @@ func (v *VoucherBiz) ExecuteNotice(ctx context.Context) error {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ func (p *OrderRepoImpl) FindInBatches(ctx context.Context, w *bo.FindInBatchesUs
|
||||||
var results = make([]*model.Order, 0)
|
var results = make([]*model.Order, 0)
|
||||||
|
|
||||||
result := p.db.DB(ctx).
|
result := p.db.DB(ctx).
|
||||||
Where("receive_success_time BETWEEN ? AND ?", w.StartTime, w.EndTime).
|
|
||||||
Where("type = ?", w.Type).
|
Where("type = ?", w.Type).
|
||||||
Where("status IN (?)", []uint8{vo.OrderStatusSuccess.GetValue(), vo.OrderStatusUse.GetValue()}).
|
Where("status IN (?)", []uint8{vo.OrderStatusSuccess.GetValue(), vo.OrderStatusUse.GetValue()}).
|
||||||
|
Where("receive_success_time BETWEEN ? AND ?", w.StartTime, w.EndTime).
|
||||||
FindInBatches(&results, 100, func(tx *gorm.DB, batch int) error {
|
FindInBatches(&results, 100, func(tx *gorm.DB, batch int) error {
|
||||||
// tx.RowsAffected 提供当前批处理中记录的计数(the count of records in the current batch)
|
// tx.RowsAffected 提供当前批处理中记录的计数(the count of records in the current batch)
|
||||||
// 'batch' 变量表示当前批号(the current batch number)
|
// 'batch' 变量表示当前批号(the current batch number)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue