| | |
| | | if (Objects.isNull(exchange.getBody())) { |
| | | throw new CoolException("上传失败!!"); |
| | | } else { |
| | | // ObjectMapper objectMapper = new ObjectMapper(); |
| | | // objectMapper.coercionConfigDefaults().setCoercion(CoercionInputShape.EmptyString, CoercionAction.AsEmpty); |
| | | CommonResponse commonResponse = new CommonResponse(); |
| | | //// |
| | | // ErpCommonResponse result = objectMapper.readValue(exchange.getBody(), ErpCommonResponse.class); |
| | | ErpCommonResponse result = JSONObject.parseObject(exchange.getBody(), ErpCommonResponse.class); |
| | | if (!result.getIsError()) { |
| | | commonResponse.setCode(200).setMsg(result.getMessage()).setData(result.getData()); |
| | |
| | | headers.add("Content-Type", "application/json"); |
| | | headers.add("api-version", "v2.0"); |
| | | |
| | | params.put("", ""); |
| | | HttpEntity httpEntity = new HttpEntity(params, headers); |
| | | ResponseEntity<String> exchange = restTemplate.exchange(rcsUrl, HttpMethod.POST, httpEntity, String.class); |
| | | log.info("修改结果: {}", exchange); |