From 49b2d4c436bdc0336e672c8b2fe4c57857760a3c Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 20 Jul 2022 18:02:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E5=8D=8E=E6=AD=A3?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=E7=9F=AD=E4=BF=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/sms/SMSHelper.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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";