فهرست منبع

打印信消息与事件通知日志

TanJingyu 1 سال پیش
والد
کامیت
9e32be794e
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      src/main/java/com/cybertogether/wx/notice/web/WxPushReceptionController.java

+ 6 - 2
src/main/java/com/cybertogether/wx/notice/web/WxPushReceptionController.java

@@ -51,8 +51,12 @@ public class WxPushReceptionController {
      * 开发配置-开发资料-消息与事件接收配置
      */
     @PostMapping("/msgEvent/{appId}")
-    public String receptionMsgEvent(@RequestBody String requestBody, @PathVariable String appId) {
-        LOGGER.info("微信通知转发服务-收到微信消息与事件通知");
+    public String receptionMsgEvent(@RequestParam("timestamp") String timestamp,
+                                    @RequestParam("nonce") String nonce,
+                                    @RequestParam("msg_signature") String msgSignature,
+                                    @RequestBody String encryptedXmlBodyText,
+                                    @PathVariable String appId) {
+        LOGGER.info("微信通知转发服务-收到微信消息与事件通知:{}-{}-{}-{}-{}", timestamp, nonce, msgSignature, appId, encryptedXmlBodyText);
         return "success";
     }
 }