diff --git a/internal/biz/cron_notice.go b/internal/biz/cron_notice.go index c778f52..4e717f7 100644 --- a/internal/biz/cron_notice.go +++ b/internal/biz/cron_notice.go @@ -190,7 +190,7 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo, notifyNum *i return err } - orderNotify := &bo.OrderNotifyBo{ + notify := &bo.OrderNotifyBo{ OrderNo: order.OrderNo, NotifyUrl: order.NotifyUrl, Channel: order.Channel, @@ -198,14 +198,14 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo, notifyNum *i Type: order.Type, } - if err = v.request(ctx, order, orderNotify, notifyNum); err != nil { + if err = v.request(ctx, order, notify, notifyNum); err != nil { return err } return v.UpdateOrderStatus(ctx, order.ID, status) } -func (v *VoucherBiz) request(ctx context.Context, order *bo.OrderBo, orderNotify *bo.OrderNotifyBo, notifyNum *int) (respErr error) { +func (v *VoucherBiz) request(ctx context.Context, order *bo.OrderBo, notify *bo.OrderNotifyBo, notifyNum *int) (respErr error) { defer func() { if err := recover(); err != nil { @@ -213,11 +213,11 @@ func (v *VoucherBiz) request(ctx context.Context, order *bo.OrderBo, orderNotify } }() - if !orderNotify.Event.CanNotify() { + if !notify.Event.CanNotify() { return nil // 不可通知,忽略 } - request, err := v.Cmb.NotifyRequest(ctx, order, orderNotify) + request, err := v.Cmb.NotifyRequest(ctx, order, notify) if err != nil { return err }