| @@ -56,7 +56,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| @RequestMapping(value = "/notify", method = RequestMethod.POST) | @RequestMapping(value = "/notify", method = RequestMethod.POST) | ||||
| @ApiOperation("接收ticket回调") | @ApiOperation("接收ticket回调") | ||||
| public Object receiveTicket(HttpServletRequest request) throws IOException { | public Object receiveTicket(HttpServletRequest request) throws IOException { | ||||
| logger.info("[" +getIpAddr() + "]接收微信请求 /wxOpen/notify"); | |||||
| logger.info("[" +getIpAddr() + "]接收微信回调 /wxOpen/notify"); | |||||
| InputStream inStream = request.getInputStream(); | InputStream inStream = request.getInputStream(); | ||||
| ByteArrayOutputStream outSteam = new ByteArrayOutputStream(); | ByteArrayOutputStream outSteam = new ByteArrayOutputStream(); | ||||
| byte[] buffer = new byte[1024]; | byte[] buffer = new byte[1024]; | ||||
| @@ -101,7 +101,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| // aes加密的消息 | // aes加密的消息 | ||||
| WxOpenXmlMessage inMessage = WxOpenXmlMessage.fromEncryptedXml(resultxml, | WxOpenXmlMessage inMessage = WxOpenXmlMessage.fromEncryptedXml(resultxml, | ||||
| openService.getWxOpenConfigStorage(), timestamp, nonce, msgSignature); | openService.getWxOpenConfigStorage(), timestamp, nonce, msgSignature); | ||||
| this.logger.debug("\n消息解密后内容为:\n{} ", inMessage.toString()); | |||||
| this.logger.info("\n消息解密后内容为:\n{} ", inMessage.toString()); | |||||
| if(inMessage.getInfoType().equals(EnumWxAuthorizationInfoType.COMPONENT_VERIFY_TICKET.getMessage())) { | if(inMessage.getInfoType().equals(EnumWxAuthorizationInfoType.COMPONENT_VERIFY_TICKET.getMessage())) { | ||||
| // 保存component_verify_ticket | // 保存component_verify_ticket | ||||
| componentVerifyTicketService.saveOrUpdate(new WxComponentVerifyTicket(){ | componentVerifyTicketService.saveOrUpdate(new WxComponentVerifyTicket(){ | ||||
| @@ -147,7 +147,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| } | } | ||||
| try { | try { | ||||
| String out = openService.getWxOpenComponentService().route(inMessage); | String out = openService.getWxOpenComponentService().route(inMessage); | ||||
| this.logger.debug("\n组装回复信息:{}", out); | |||||
| this.logger.info("\n组装回复信息:{}", out); | |||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| this.logger.error("notify", e); | this.logger.error("notify", e); | ||||
| } | } | ||||
| @@ -158,7 +158,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| @RequestMapping(value = "/{appId}/callback") | @RequestMapping(value = "/{appId}/callback") | ||||
| @ApiOperation("消息回调") | @ApiOperation("消息回调") | ||||
| public Object callback(@PathVariable("appId") String appId, HttpServletRequest request) throws IOException { | public Object callback(@PathVariable("appId") String appId, HttpServletRequest request) throws IOException { | ||||
| logger.info("[" +getIpAddr() + "]接收微信请求 /{appId}/callback"); | |||||
| logger.info("[" +getIpAddr() + "]接收微信APP回调 /{appId}/callback"); | |||||
| InputStream inStream = request.getInputStream(); | InputStream inStream = request.getInputStream(); | ||||
| ByteArrayOutputStream outSteam = new ByteArrayOutputStream(); | ByteArrayOutputStream outSteam = new ByteArrayOutputStream(); | ||||
| byte[] buffer = new byte[1024]; | byte[] buffer = new byte[1024]; | ||||
| @@ -192,7 +192,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| // aes加密的消息 | // aes加密的消息 | ||||
| WxMpXmlMessage inMessage = WxOpenXmlMessage.fromEncryptedMpXml(resultxml, | WxMpXmlMessage inMessage = WxOpenXmlMessage.fromEncryptedMpXml(resultxml, | ||||
| openService.getWxOpenConfigStorage(), timestamp, nonce, msgSignature); | openService.getWxOpenConfigStorage(), timestamp, nonce, msgSignature); | ||||
| logger.debug("\n消息解密后内容为:\n{} ", inMessage.toString()); | |||||
| logger.info("\n消息解密后内容为:\n{} ", inMessage.toString()); | |||||
| // 全网发布测试用例 | // 全网发布测试用例 | ||||
| if (StringUtils.equalsAnyIgnoreCase(appId, "wx570bc396a51b8ff8", "wxd101a85aa106f53e")) { | if (StringUtils.equalsAnyIgnoreCase(appId, "wx570bc396a51b8ff8", "wxd101a85aa106f53e")) { | ||||
| try { | try { | ||||