| | |
| | | String decryptedMessage = wxcpt.DecryptRobotMsg(msgSignature, timestamp, nonce, jsonObject.toString()); |
| | | System.out.println("接收到机器人发送的加密消息:" + jsonObject.toJSONString()); |
| | | System.out.println("接收到机器人发送的解密后消息:" + decryptedMessage); |
| | | |
| | | return wxcpt.EncryptMsg("消息已收到", "", nonce); |
| | | JSONObject decryptedMessageJson = JSONObject.parseObject(decryptedMessage); |
| | | if (decryptedMessageJson.getString("msgtype").equals("text")) { |
| | | return wxcpt.EncryptRobotMsg("消息已收到", "", nonce); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | try { |
| | | if (wxcpt != null) { |
| | | return wxcpt.EncryptMsg("消息接收出现异常,请联系管理员处理 o(╥﹏╥o...)", "", nonce); |
| | | return wxcpt.EncryptRobotMsg("消息接收出现异常,请联系管理员处理 o(╥﹏╥o...)", "", nonce); |
| | | } |
| | | } catch (AesException aesException) { |
| | | aesException.printStackTrace(); |