| | |
| | | } |
| | | if (phones.length() >0){ |
| | | phones.deleteCharAt(phones.length() - 1); |
| | | String memo = String.format("短信已发送[%s]", phones); |
| | | sysAlarmPerson.setMemo(memo); |
| | | |
| | | } |
| | | |
| | | String suffix = String.format("?head=%s&signature=%s&content=%s&telnumber=%s", head, signature, content, phones.toString().replace(" ", "")); |
| | |
| | | post.setHeader("Content-Type", "application/json;charset=UTF-8"); |
| | | CloseableHttpResponse response = client.execute(post); |
| | | String resData = EntityUtils.toString(response.getEntity(),"UTF-8"); |
| | | client.close(); |
| | | JSONObject res = JSONObject.parseObject(resData); |
| | | if ("200".equals(res.getString("code")) && phones.length() >0){ |
| | | String memo = String.format("短信已发送[%s]", phones); |
| | | sysAlarmPerson.setMemo(memo); |
| | | } |
| | | logger.info(resData); |
| | | |
| | | } |