From b58a3f20a44f66d622e7d77b39303a12ec7856e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Fri, 21 Mar 2025 15:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=A1=E8=B6=B3=E5=8E=8B=E6=B5=8B=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/order.go | 5 ----- internal/data/repoimpl/order.go | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/biz/order.go b/internal/biz/order.go index d00067b..d6b9f73 100644 --- a/internal/biz/order.go +++ b/internal/biz/order.go @@ -76,11 +76,6 @@ func (v *VoucherBiz) create(ctx context.Context, req *bo.OrderCreateReqBo, produ Attach: req.Attach, } - if product.ProductNo == "001" { - // 压测商品 - o.Status = vo.OrderStatusSuccess - } - return v.OrderRepo.Create(ctx, o) } diff --git a/internal/data/repoimpl/order.go b/internal/data/repoimpl/order.go index 8463968..8342f1d 100644 --- a/internal/data/repoimpl/order.go +++ b/internal/data/repoimpl/order.go @@ -76,7 +76,8 @@ func (p *OrderRepoImpl) Create(ctx context.Context, req *bo.OrderBo) (*bo.OrderB } if req.ProductNo == "001" { - req.VoucherNo = req.OrderNo + info.VoucherNo = req.OrderNo + info.Status = vo.OrderStatusSuccess.GetValue() } tx := p.DB(ctx).Create(info)