孙永军 il y a 2 ans
Parent
commit
3d9b083d52

+ 0 - 9
src/main/java/com/sxtvs/open/api/clue/controller/ClueController.java

@@ -32,10 +32,6 @@ public class ClueController {
     @Resource
     private ClueReplyServiceImpl clueReplyService;
 
-    @Resource
-    private AliyunLogger logger;
-
-
     @RequestMapping("list")
     @LoginRequired
     public IPage<Clue> ls(@RequestBody ClueDTO clueDTO){
@@ -72,9 +68,4 @@ public class ClueController {
         return clueService.info(clueId);
     }
 
-    @GetMapping("wx_create")
-    public void wxCreate(@RequestBody String wxXml){
-        logger.info("wx xml", wxXml);
-//        return "OK";
-    }
 }

+ 27 - 0
src/main/java/com/sxtvs/open/api/clue/controller/WxClueController.java

@@ -0,0 +1,27 @@
+package com.sxtvs.open.api.clue.controller;
+
+import com.sxtvs.open.core.sls.AliyunLogger;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.io.IOException;
+
+@Controller
+@RequestMapping("clue")
+public class WxClueController {
+
+    @Resource
+    private AliyunLogger logger;
+
+    @RequestMapping("wx_create")
+    public void wxCreate(@RequestBody String wxXml, @RequestParam("echostr") String nonce, HttpServletResponse response) throws IOException {
+
+        logger.info("wx xml", wxXml);
+        response.getWriter().write(nonce);
+
+    }
+}