From 0fd16e66b7d118919005e4b5de1452fc94e84ad7 Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Wed, 23 Sep 2026 18:12:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=9B=E5=BB=BA=E6=97=B6=E7=9A=84=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E6=89=B9=E6=AC=A1=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 该校验逻辑已迁移至其他模块处理,此处移除冗余的时间校验代码,简化业务逻辑 --- internal/biz/order.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/internal/biz/order.go b/internal/biz/order.go index c08c612..e136045 100644 --- a/internal/biz/order.go +++ b/internal/biz/order.go @@ -3,10 +3,8 @@ package biz import ( "context" "fmt" - "time" err2 "voucher/api/err" "voucher/internal/biz/bo" - "voucher/internal/biz/businesserr" "voucher/internal/biz/vo" ) @@ -34,21 +32,6 @@ func (this *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) return nil, product, err3 } - if product.StartTime == nil { - return nil, product, businesserr.BatchNotSetStartedError - } - if product.EndTime == nil { - return nil, product, businesserr.BatchSetEndedError - } - - nowTime := time.Now() - if nowTime.Before(*product.StartTime) { - return nil, product, businesserr.BatchNotStartedError - } - if nowTime.After(*product.EndTime) { - return nil, product, businesserr.BatchEndedError - } - order, err3 = this.order(ctx, req, product) if err3 != nil { return nil, product, err3 -- 2.40.1