From 6aaf9f3e127d6a2252c2f478806127eeb4aa6f38 Mon Sep 17 00:00:00 2001 From: ziming Date: Thu, 26 Mar 2026 11:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=B8=BB=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/wechat_notify.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/biz/wechat_notify.go b/internal/biz/wechat_notify.go index 18c0f8f..7907bbd 100644 --- a/internal/biz/wechat_notify.go +++ b/internal/biz/wechat_notify.go @@ -17,6 +17,10 @@ func (this *VoucherBiz) WechatNotifyConsumer(ctx context.Context, ip string, req order, err := this.getOrder(ctx, req) if err != nil { + // 系统订单不存在 + //if errors.Is(err, gorm.ErrRecordNotFound) { + // return nil + //} return err } @@ -53,7 +57,7 @@ func (this *VoucherBiz) getOrder(ctx context.Context, req *bo.WechatVoucherNotif order, err := this.OrderRepo.GetByCouponId(ctx, req.PlainText.StockCreatorMchid, req.PlainText.StockID, req.PlainText.CouponID) if err != nil { - return nil, fmt.Errorf("订单查询错误 error: %v", err) + return nil, fmt.Errorf("订单查询错误 error: %w", err) } return order, nil