| | |
| | | |
| | | |
| | | public boolean sendCellulantMessage(String toPhone, String msg){ |
| | | String url = "https://sms.nalosolutions.com/smsbackend/Nal_resl/send-message/"; |
| | | String url = "https://sms.nalosolutions.com/smsbackend/clientapi/Cell_resl/send-message/"; |
| | | HttpRequest post = HttpUtil.createPost(url); |
| | | post.contentType(ContentType.JSON.toString()); |
| | | JSONObject params = new JSONObject(); |
| | |
| | | HttpResponse execute = post.execute(); |
| | | String body = execute.body(); |
| | | execute.close(); |
| | | System.err.println("短信:" + body); |
| | | JSONObject jsonObject = JSON.parseObject(body); |
| | | Integer status = jsonObject.getInteger("status"); |
| | | if(1701 == status){ |
| | | if(null != status && 1701 == status){ |
| | | return true; |
| | | }else{ |
| | | System.err.println("短信发送失败:" + jsonObject.toJSONString()); |
| | | return false; |
| | | } |
| | | } |