Merge branch 'wcd-2411-update' into wcd
| | |
| | | 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(); |
| | |
| | | */ |
| | | private static void fixJsonStructure(JSONObject jsonObject) { |
| | | // 定义需要确保为列表的字段名 |
| | | String[] listFields = {"ProcessList", "NodeList", "Details", "Notifyer", "SubNodeList", "SpRecord" }; |
| | | String[] listFields = {"ProcessList", "NodeList", "Details", "Notifyer", "SubNodeList", "SpRecord", "Comments" }; |
| | | |
| | | for (String fieldName : listFields) { |
| | | if (jsonObject.has(fieldName)) { |