refactor: 移除订单创建时的优惠券批次时间校验逻辑 #4

Merged
fuzhongyun merged 1 commits from fix/fzy/time into pro 2026-09-23 18:13:26 +08:00
1 changed files with 0 additions and 17 deletions
Showing only changes of commit 0fd16e66b7 - Show all commits

View File

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