From f0cdc8d296b4c3fdd91627e60ac54327b9346ee2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 2 Jan 2023 00:05:27 +0800 Subject: [PATCH] =?UTF-8?q?mp=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/open/MpOpenController.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java index a6284ab6d..709d2b89d 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java @@ -22,7 +22,12 @@ public class MpOpenController { @Resource private MpServiceFactory mpServiceFactory; - @ApiOperation("校验签名") // 参见 https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html 文档 + /** + * 接收微信公众号的校验签名 + * + * 对应 文档 + */ + @ApiOperation("校验签名") // 参见 @GetMapping(value = "/{appId}", produces = "text/plain;charset=utf-8") public String checkSignature(@PathVariable("appId") String appId, MpOpenCheckSignatureReqVO reqVO) { @@ -37,4 +42,15 @@ public class MpOpenController { return "非法请求"; } + /** + * 接收微信公众号的消息推送 + * + * 文档 + */ + @ApiOperation("处理消息") + @PostMapping(value = "/{appId}", produces = "application/xml; charset=UTF-8") + public String handleMessage() { + return "123"; + } + }