diff --git a/internal/biz/wechat_notify.go b/internal/biz/wechat_notify.go index 502cf1d..b0ee68e 100644 --- a/internal/biz/wechat_notify.go +++ b/internal/biz/wechat_notify.go @@ -43,10 +43,10 @@ func (v *VoucherBiz) WechatNotifyConsumer(ctx context.Context, tag string, req * } else if req.PlainText.Status.IsExpired() { return v.expired(ctx, order) - } else { - return fmt.Errorf("未知通知类型:%s", req.PlainText.Status.GetText()) } + return fmt.Errorf("未知通知类型:%s", req.PlainText.Status.GetText()) + }) } @@ -141,10 +141,10 @@ func (v *VoucherBiz) cmbNotify(ctx context.Context, orderId uint64) error { return err } - if orderNotify, err := v.Cmb.Notify(ctx, order); err != nil { + if orderNotify, err2 := v.Cmb.Notify(ctx, order); err2 != nil { - if !errPb.IsNeedRetryNotify(err) { - return err + if !errPb.IsNeedRetryNotify(err2) { + return err2 } // 第一次通知失败重试入队