diff --git a/internal/biz/cron_notice.go b/internal/biz/cron_notice.go index abfe8de..75d0873 100644 --- a/internal/biz/cron_notice.go +++ b/internal/biz/cron_notice.go @@ -160,16 +160,16 @@ func (v *VoucherBiz) ExecuteNotice(ctx context.Context, req *bo.FindInBatchesUse func (v *VoucherBiz) orderNotice(ctx context.Context, order *bo.OrderBo, notifyNum *int) (respErr error) { - if order == nil { - return fmt.Errorf("订单对象为 nil") - } - defer func() { if err := recover(); err != nil { respErr = fmt.Errorf("panic,err:%v", err) } }() + if order == nil { + return fmt.Errorf("订单对象为 nil") + } + return v.notice(ctx, order, notifyNum) }