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