| | |
| | | ResponseEntity<String> exchange = restTemplate.exchange(callUrl, HttpMethod.POST, httpEntity, String.class); |
| | | log.info("任务执行状态上报,响应结果: {}", exchange); |
| | | if (Objects.isNull(exchange.getBody())) { |
| | | throw new CoolException("任务执行状态上报失败!!"); |
| | | return R.error(); |
| | | } else { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | objectMapper.coercionConfigDefaults() |
| | |
| | | if (result.getCode() == 200) { |
| | | return R.ok(); |
| | | } else { |
| | | throw new CoolException("任务执行状态上报失败!!"); |
| | | return R.error(result.getMsg()); |
| | | // throw new CoolException("任务执行状态上报失败!!"); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new CoolException(e.getMessage()); |