From 194b508f5564446b53d8725fa093a3d1ee3d2672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Tue, 18 Mar 2025 11:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=89=B9=E6=AC=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/server/http.go | 2 -- internal/service/wechat_notify_consume.go | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/internal/server/http.go b/internal/server/http.go index c91851e..1cd1114 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -34,8 +34,6 @@ func NewHTTPServer( return ctx.String(http2.StatusOK, "pong") }) - r.POST("/wechatNotify", voucherService.WechatNotify) - cmb := r.Group("/cmb") v1 := cmb.Group("/v1") diff --git a/internal/service/wechat_notify_consume.go b/internal/service/wechat_notify_consume.go index 7e1ee5d..8f4acd4 100644 --- a/internal/service/wechat_notify_consume.go +++ b/internal/service/wechat_notify_consume.go @@ -3,23 +3,9 @@ package service import ( "context" "encoding/json" - "github.com/go-kratos/kratos/v2/log" - "github.com/go-kratos/kratos/v2/transport/http" - "io" "voucher/internal/biz/bo" ) -func (v *VoucherService) WechatNotify(ctx http.Context) error { - bodyBytes, err := io.ReadAll(ctx.Request().Body) - if err != nil { - return err - } - - log.Warnf("微信回调通知bodyBytes: %s", bodyBytes) - - return ctx.JSON(200, "ok") -} - func (v *VoucherService) WechatUseNotifyConsumer(ctx context.Context, tag, msg string) error { var req *bo.WechatVoucherNotifyBo