Commit f0cdc8d296b4c3fdd91627e60ac54327b9346ee2
1 parent
c671b01b
mp:增加消息推送的接口
Showing
1 changed file
with
17 additions
and
1 deletions
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 { |
| 22 | 22 | @Resource |
| 23 | 23 | private MpServiceFactory mpServiceFactory; |
| 24 | 24 | |
| 25 | - @ApiOperation("校验签名") // 参见 https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html 文档 | |
| 25 | + /** | |
| 26 | + * 接收微信公众号的校验签名 | |
| 27 | + * | |
| 28 | + * 对应 <a href="https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html">文档</a> | |
| 29 | + */ | |
| 30 | + @ApiOperation("校验签名") // 参见 | |
| 26 | 31 | @GetMapping(value = "/{appId}", produces = "text/plain;charset=utf-8") |
| 27 | 32 | public String checkSignature(@PathVariable("appId") String appId, |
| 28 | 33 | MpOpenCheckSignatureReqVO reqVO) { |
| ... | ... | @@ -37,4 +42,15 @@ public class MpOpenController { |
| 37 | 42 | return "非法请求"; |
| 38 | 43 | } |
| 39 | 44 | |
| 45 | + /** | |
| 46 | + * 接收微信公众号的消息推送 | |
| 47 | + * | |
| 48 | + * <a href="https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html">文档</a> | |
| 49 | + */ | |
| 50 | + @ApiOperation("处理消息") | |
| 51 | + @PostMapping(value = "/{appId}", produces = "application/xml; charset=UTF-8") | |
| 52 | + public String handleMessage() { | |
| 53 | + return "123"; | |
| 54 | + } | |
| 55 | + | |
| 40 | 56 | } | ... | ... |