|
|
|
@ -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<String> 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<String> res = restTemplate.postForEntity(URL, requestEntity, String.class); |
|
|
|
|
LOG.info("===send sms end==== : {} ", res); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
ResponseEntity<String> res = restTemplate.postForEntity(URL, requestEntity, String.class); |
|
|
|
|
LOG.info("===send sms end==== : {} ", res); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|