diff --git a/internal/data/repoimpl/order.go b/internal/data/repoimpl/order.go index ffee52f..36cccf3 100644 --- a/internal/data/repoimpl/order.go +++ b/internal/data/repoimpl/order.go @@ -66,7 +66,7 @@ func (p *OrderRepoImpl) FinFailByStockIdInBatches(ctx context.Context, batchNo s Where("batch_no = ?", batchNo). Where("status = ?", vo.OrderStatusFail.GetValue()). //Where("remark <> ?", "error: code = 500 reason = WechatFAIL message = 微信返回错误:该用户账号异常,无法领券。商家可联系微信支付或让用户联系微信支付客服处理。 metadat"). - FindInBatches(&results, 50, func(tx *gorm.DB, batch int) error { + FindInBatches(&results, 100, func(tx *gorm.DB, batch int) error { return fun(ctx, p.ToBos(results)) }) @@ -83,8 +83,8 @@ func (p *OrderRepoImpl) FindIngInBatches(ctx context.Context, fun func(ctx conte result := p.DB(ctx). Where("status = ?", vo.OrderStatusIng.GetValue()). - Limit(100). - FindInBatches(&results, 20, func(tx *gorm.DB, batch int) error { + Limit(20). + FindInBatches(&results, 10, func(tx *gorm.DB, batch int) error { return fun(ctx, p.ToBos(results)) })