This commit is contained in:
parent
6bfd3fe7fd
commit
34a947d5a0
|
|
@ -33,7 +33,7 @@ func (p *OrderRepoImpl) DB(ctx context.Context) *gorm.DB {
|
|||
|
||||
func (p *OrderRepoImpl) SpecifyFindInBatches(ctx context.Context, req *bo.FindInBatchesBo, fun func(ctx context.Context, rows []*bo.OrderBo) error) error {
|
||||
|
||||
tx := p.DB(ctx).Where("status = ?", vo.OrderStatusSuccess.GetValue())
|
||||
tx := p.DB(ctx)
|
||||
|
||||
if req.ProductNo != "" {
|
||||
tx = tx.Where("product_no = ?", req.ProductNo)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import (
|
|||
"gorm.io/gorm"
|
||||
"voucher/internal/biz/bo"
|
||||
"voucher/internal/biz/repo"
|
||||
"voucher/internal/biz/vo"
|
||||
"voucher/internal/data"
|
||||
"voucher/internal/data/model"
|
||||
)
|
||||
|
|
@ -27,7 +26,7 @@ func (p *OrderBakRepoImpl) DB(ctx context.Context) *gorm.DB {
|
|||
|
||||
func (p *OrderBakRepoImpl) SpecifyFindInBatches(ctx context.Context, req *bo.FindInBatchesBo, fun func(ctx context.Context, rows []*bo.OrderBo) error) error {
|
||||
|
||||
tx := p.DB(ctx).Where("status = ?", vo.OrderStatusSuccess.GetValue())
|
||||
tx := p.DB(ctx)
|
||||
|
||||
if req.ProductNo != "" {
|
||||
tx = tx.Where("product_no = ?", req.ProductNo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue