| | |
| | | |
| | | HttpEntity<String> stringHttpEntity = new HttpEntity<>(Base64Utils.encodeToString(objectMapper.writeValueAsBytes(mac)), httpHeaders); |
| | | ResponseEntity<String> response = restTemplate.postForEntity(url + "/sms/submit", sendReq, String.class); |
| | | SendRes sendRes = objectMapper.readValue(response.getBody(), SendRes.class); |
| | | if (sendRes.getRspcod().equals("success")) { |
| | | return 2; |
| | | } else { |
| | | return 3; |
| | | if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank( response.getBody())) { |
| | | SendRes sendRes = objectMapper.readValue(response.getBody(), SendRes.class); |
| | | if (sendRes.getRspcod().equals("success")) { |
| | | return 2; |
| | | } else { |
| | | return 3; |
| | | } |
| | | } |
| | | return 3; |
| | | } |
| | | |
| | | //发送邮件 |