From edc44a20a5682a026ec50ae15505c12c2e0f1281 Mon Sep 17 00:00:00 2001 From: liushaodong Date: Thu, 7 Nov 2019 10:51:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E7=9F=AD=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/common/utils/SendSmsgCode.java | 25 +++++++------------ .../main/resources/properties/smsconf-dev.yml | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/common/utils/SendSmsgCode.java b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/common/utils/SendSmsgCode.java index 2f1bf81..4da783b 100644 --- a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/common/utils/SendSmsgCode.java +++ b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/common/utils/SendSmsgCode.java @@ -1,4 +1,4 @@ -package com.blockchain.server.user.common.utils; +package com.blockchain.server.system.common.util; import lombok.Data; import org.slf4j.Logger; @@ -65,18 +65,12 @@ public class SendSmsgCode { requestEntity.add("Account", Account); requestEntity.add("Pwd", Pwd); requestEntity.add("Content", smsCode); + requestEntity.add("Mobile", internationalCode + mobile); //国内手机 if (CHINA_CODE.equals(internationalCode)) { - requestEntity.add("Mobile", mobile); +// requestEntity.add("Mobile", mobile); requestEntity.add("TemplateId", TemplateId_ZH_CN); requestEntity.add("SignId", SignId_ZH_CN); - - try { - ResponseEntity res = restTemplate.postForEntity(URL, requestEntity, String.class); - LOG.info("===send sms end==== : {} ", res); - } catch (Exception e) { - e.printStackTrace(); - } } else { //国际代码 if (BIG5_CODE.contains(internationalCode)) { @@ -86,13 +80,12 @@ public class SendSmsgCode { requestEntity.add("SignId", SignId_EN_US); requestEntity.add("TemplateId", TemplateId_EN_US); } - - try { - ResponseEntity res = restTemplate.postForEntity(URL, requestEntity, String.class); - LOG.info("===send sms end==== : {} ", res); - } catch (Exception e) { - e.printStackTrace(); - } + } + try { + ResponseEntity res = restTemplate.postForEntity(URL, requestEntity, String.class); + LOG.info("===send sms end==== : {} ", res); + } catch (Exception e) { + e.printStackTrace(); } } diff --git a/spring-cloud/spring-cloud-config/src/main/resources/properties/smsconf-dev.yml b/spring-cloud/spring-cloud-config/src/main/resources/properties/smsconf-dev.yml index 440af77..48fe91e 100644 --- a/spring-cloud/spring-cloud-config/src/main/resources/properties/smsconf-dev.yml +++ b/spring-cloud/spring-cloud-config/src/main/resources/properties/smsconf-dev.yml @@ -4,7 +4,7 @@ feigesms: #国内短信接口 URL: http://api.feige.ee/SmsService/Inter Account: 18818574533 - Pwd: zxc2019 + Pwd: 18680fdeaca3c374c2fe276f5 TemplateId_ZH_CN: 38129 SignId_ZH_CN: 38944 TemplateId_ZH_HK: 38120