jackson 修改值
2021-01-13 12:16:46
public InputStream getBody() throws IOException { String content = ByteUtil.inputStream2String(inputMessage.getBody(), charset); JsonNode jsonNode = JsonUtil.str2JsonNode(content); String data= jsonNode.get("Data").asText(); String decryptBody= AesUtil.decryptCbcPKCS5Padding(Constant.kuaidianDataSecret, Constant.kuaidianDataSecretIV, data); JsonNode dataNode = JsonUtil.str2JsonNode(decryptBody); ObjectNode objectNode = (ObjectNode) jsonNode; objectNode.set("Data",dataNode); String result = JsonUtil.entity2Json(objectNode); String timeStamp = jsonNode.get("TimeStamp").asText(); String Seq = jsonNode.get("Seq").asText(); EvcsSigThreadLocal threadLocal = EvcsSigThreadLocal.get(); if (threadLocal == null) { threadLocal = new EvcsSigThreadLocal(); threadLocal.setTimeStamp(timeStamp); threadLocal.setSeq(Seq); EvcsSigThreadLocal.set(threadLocal); } else { threadLocal.setTimeStamp(timeStamp); threadLocal.setSeq(Seq); } return new ByteArrayInputStream(result.getBytes(charset)); }
https://scrm-1259589177.cos.ap-guangzhou.myqcloud.com/qwwork/login-qrcode-101051198410018.jpg