diff --git a/src/main/java/com/xkrs/sms/SMSHelper.java b/src/main/java/com/xkrs/sms/SMSHelper.java index 13f22d9..8bc92b7 100644 --- a/src/main/java/com/xkrs/sms/SMSHelper.java +++ b/src/main/java/com/xkrs/sms/SMSHelper.java @@ -78,13 +78,11 @@ public class SMSHelper { } } String telephoneContent = telephoneBuilder.toString(); - String url = "http://58.56.128.186:10144/msg/msgReceive"; + String url = "http://58.56.128.186:10144/msg/msgSend"; Map map = new HashMap<>(); map.put("receiver", telephoneContent); - map.put("msgContent", "{\"content\":\"{'address':'" + templateParamArray[0] + "'}\"}"); - map.put("idType", "30"); - map.put("sendChannel", "30"); - map.put("sendAccount", "12"); + map.put("msgContent", "{\"address\":\"" + templateParamArray[0] + "\"}"); + map.put("templateUid", "27dbffdf8b0a492e"); HttpClientUtils.sendHttpPost(url, new ObjectMapper().writeValueAsString(map)); //记录短信通知日志 @@ -124,13 +122,11 @@ public class SMSHelper { */ private void huazhengSMSCode(String telephone, String code) throws Exception { - String url = "http://58.56.128.186:10144/msg/msgReceive"; + String url = "http://58.56.128.186:10144/msg/msgSend"; Map map = new HashMap<>(); map.put("receiver", telephone); - map.put("msgContent", "{\"content\":\"{'code':'" + code + "'}\"}"); - map.put("idType", "30"); - map.put("sendChannel", "30"); - map.put("sendAccount", "11"); + map.put("msgContent", "{\"code\":\"" + code + "\"}"); + map.put("templateUid", "6f7672a4978542e2"); HttpClientUtils.sendHttpPost(url, new ObjectMapper().writeValueAsString(map)); //记录短信通知日志 String stringBuilder = "发送人:青岛华正信息技术股份有限公司\n" + "接收人:" + telephone + "\n" + "验证码:" + code + "\n";