| | |
| | | String timestamp = request.getParameter("timestamp"); |
| | | String signature = request.getParameter("signature"); |
| | | String msgSignature = request.getParameter("msg_signature"); |
| | | String echostr = request.getParameter("echostr"); |
| | | String encType = request.getParameter("encrypt_type"); |
| | | String xml = IOUtils.toString(request.getReader()); |
| | | log.info("企业微信回调参数nonce"+nonce); |
| | |
| | | log.info("企业微信回调参数msgSignature"+msgSignature); |
| | | log.info("企业微信回调参数encType"+encType); |
| | | log.info("企业微信回调参数xml"+xml); |
| | | log.info("企业微信回调参数echostr"+echostr); |
| | | if(StringUtils.isNotBlank(msgSignature)&&StringUtils.isNotBlank(timestamp)&&StringUtils.isNotBlank(nonce)&&StringUtils.isNotBlank(xml)){ |
| | | String reponseStr = wxCryptUtil.decryptXml(msgSignature,timestamp,nonce,xml); |
| | | log.info("企业微信回调参数xml解析"+reponseStr); |
| | | } |
| | | return "SUCCESS"; |
| | | if(StringUtils.isNotBlank(msgSignature)&&StringUtils.isNotBlank(timestamp)&&StringUtils.isNotBlank(nonce)&&StringUtils.isNotBlank(echostr)){ |
| | | String reponseStr = wxCryptUtil.decryptContent(msgSignature,timestamp,nonce,echostr); |
| | | log.info("企业微信回调参数xml解析"+reponseStr); |
| | | return reponseStr; |
| | | } |
| | | return echostr; |
| | | } |
| | | |
| | | |
| | | |
| | | } |