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

+ 5 - 1
src/main/java/com/cybertogether/wx/notice/web/WxPushReceptionController.java

@@ -5,6 +5,7 @@ import com.cybertogether.wx.notice.infrastructure.HttpClientUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 
@@ -52,7 +53,10 @@ public class WxPushReceptionController {
      */
     @PostMapping("/msgEvent/{appId}")
     public String receptionMsgEvent(@RequestBody String requestBody, @PathVariable String appId) {
-        LOGGER.info("微信通知转发服务-收到微信消息与事件通知-{}", requestBody);
+        if (!StringUtils.hasText(appId)) {
+            appId = "空";
+        }
+        LOGGER.info("微信通知转发服务-收到微信消息与事件通知-{}-appId:" + appId, requestBody);
         return "success";
     }
 }