Commit 433c65ae authored by shiyu's avatar shiyu

公众号

parent 5edb3a02
...@@ -36,7 +36,8 @@ public class OfficialAccountController { ...@@ -36,7 +36,8 @@ public class OfficialAccountController {
@RequestMapping(value ="/getNotice") @RequestMapping(value ="/getNotice")
public String getSubscribeNotice(HttpServletRequest request, HttpServletResponse response){ public String getNotice(HttpServletRequest request, HttpServletResponse response){
logger.info("1111111111111111");
ByteArrayOutputStream output = null; ByteArrayOutputStream output = null;
InputStream input = null; InputStream input = null;
try { try {
...@@ -83,11 +84,12 @@ public class OfficialAccountController { ...@@ -83,11 +84,12 @@ public class OfficialAccountController {
@RequestMapping(value ="/getSubscribeNotice") @RequestMapping(value ="/getSubscribeNotice")
public Object getNotice(@RequestParam(required = false, name = "signature") String signature, public Object getSubscribeNotice(@RequestParam(required = false, name = "signature") String signature,
@RequestParam(required = false, name = "timestamp") String timestamp, @RequestParam(required = false, name = "timestamp") String timestamp,
@RequestParam(required = false, name = "nonce") String nonce, @RequestParam(required = false, name = "nonce") String nonce,
@RequestParam(required = false, name = "echostr") String echostr, @RequestParam(required = false, name = "echostr") String echostr,
@RequestBody(required = false) String xml) { @RequestBody(required = false) String xml) {
logger.info("222222222222222");
try { try {
List<Map<String, String>> list = XmlUtils.fromXml(xml, "xml"); List<Map<String, String>> list = XmlUtils.fromXml(xml, "xml");
Map<String, String> contentMap = list.get(0); Map<String, String> contentMap = list.get(0);
...@@ -101,7 +103,7 @@ public class OfficialAccountController { ...@@ -101,7 +103,7 @@ public class OfficialAccountController {
} catch (Exception e) { } catch (Exception e) {
logger.error("视频号回调推送error : {}", e); logger.error("视频号回调推送error : {}", e);
} }
return "success"; return echostr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment