From e9a754e08ae3b9d698e600321e007ea928e6dcc6 Mon Sep 17 00:00:00 2001 From: ziming Date: Wed, 21 May 2025 11:40:36 +0800 Subject: [PATCH] kg --- internal/biz/wechat_notify.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 } // 第一次通知失败重试入队