| | |
| | | |
| | | JSONObject dataJson; |
| | | if (isJson(callbackXmlData)) { |
| | | dataJson = new JSONObject(callbackXmlData); |
| | | } else { |
| | | JSONObject xmlJson = XML.toJSONObject(callbackXmlData); |
| | | |
| | | WechatSendHistory afterHistory1 = new WechatSendHistory(); |
| | |
| | | wechatSendHistoryRepository.save(afterHistory1); |
| | | |
| | | dataJson = xmlJson.getJSONObject("xml"); |
| | | } else { |
| | | dataJson = new JSONObject(callbackXmlData); |
| | | } |
| | | // 处理数据 |
| | | JSONObject finalDataJson = new JSONObject(dataJson.keySet().stream().collect(Collectors.toMap(key -> key.toLowerCase(), val -> dataJson.get(val)))); |