Selaa lähdekoodia

微信改用get

zhaops 5 vuotta sitten
vanhempi
commit
b40c279c60

+ 5 - 2
zzcx-service/src/main/java/com/diagbot/web/WexinController.java

@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,8 +36,10 @@ public class WexinController {
     @Autowired
     WeixinFacade weixinFacade;
 
-    @RequestMapping("/getConfig")
-    public RespDTO<Map> getConfig(@RequestBody WeixinVO weixinVO) {
+    @GetMapping("/getConfig")
+    public RespDTO<Map> getConfig(HttpServletRequest request) {
+        WeixinVO weixinVO = new WeixinVO();
+        weixinVO.setUrl(request.getRequestURL().toString());
         Map<String, String> map = weixinFacade.getConfig(weixinVO);
         return RespDTO.onSuc(map);
     }