From 34a947d5a0b106d8f8211223d9c256f24c671255 Mon Sep 17 00:00:00 2001 From: ziming Date: Fri, 1 Aug 2025 13:49:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/repoimpl/order.go | 2 +- internal/data/repoimpl/order_bak.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/data/repoimpl/order.go b/internal/data/repoimpl/order.go index c7dec1a..bf73fe5 100644 --- a/internal/data/repoimpl/order.go +++ b/internal/data/repoimpl/order.go @@ -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) diff --git a/internal/data/repoimpl/order_bak.go b/internal/data/repoimpl/order_bak.go index d04d1a5..14f0bdf 100644 --- a/internal/data/repoimpl/order_bak.go +++ b/internal/data/repoimpl/order_bak.go @@ -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)