This commit is contained in:
ziming 2025-08-01 13:49:39 +08:00
parent 6bfd3fe7fd
commit 34a947d5a0
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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)