|
@@ -34,13 +34,18 @@ public class SmsSendServiceImpl implements SmsSendService {
|
|
@Value("${sms.notice.templateid.register.phone:#{null}}")
|
|
@Value("${sms.notice.templateid.register.phone:#{null}}")
|
|
private String noticeTemplateId4registerPhone;
|
|
private String noticeTemplateId4registerPhone;
|
|
|
|
|
|
|
|
+ @Value("${sms.notice.templateid.modify.password:#{null}}")
|
|
|
|
+ private String noticeTemplateId4modifyPassword;
|
|
|
|
+
|
|
|
|
+ @Value("${sms.notice.templateid.modify.phone:#{null}}")
|
|
|
|
+ private String noticeTemplateId4ModifyPhone;
|
|
|
|
+
|
|
@Value("${sms.notice.templateid.jiuzhi:#{null}}")
|
|
@Value("${sms.notice.templateid.jiuzhi:#{null}}")
|
|
private String noticeTemplateId4jiuzhi;
|
|
private String noticeTemplateId4jiuzhi;
|
|
|
|
|
|
@Value("${sms.notice.templateid.diedao:#{null}}")
|
|
@Value("${sms.notice.templateid.diedao:#{null}}")
|
|
private String noticeTemplateId4diedao;
|
|
private String noticeTemplateId4diedao;
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 注册手机号发送短信验证码
|
|
* 注册手机号发送短信验证码
|
|
* @param phone
|
|
* @param phone
|
|
@@ -65,6 +70,54 @@ public class SmsSendServiceImpl implements SmsSendService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 重置密码发送短信验证码
|
|
|
|
+ * @param phone
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public boolean sendSmsCode4ModifyPassword(String phone,String params) {
|
|
|
|
+
|
|
|
|
+ String[] _p = {params};
|
|
|
|
+ SendStatus sendStatus = SmsUtil.sendSms(noticeEndpoint,
|
|
|
|
+ noticeRegion,
|
|
|
|
+ noticeSecretId,
|
|
|
|
+ noticeecretKey,
|
|
|
|
+ noticeSmsSdkAppId,
|
|
|
|
+ noticeSignName,
|
|
|
|
+ noticeTemplateId4modifyPassword,
|
|
|
|
+ phone,_p);
|
|
|
|
+ if (sendStatus!=null && "Ok".equals(sendStatus.getCode())){
|
|
|
|
+ return true;
|
|
|
|
+ }else{
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改手机号发送短信验证码
|
|
|
|
+ * @param phone
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public boolean sendSmsCode4ModifyPhone(String phone,String params) {
|
|
|
|
+
|
|
|
|
+ String[] _p = {params};
|
|
|
|
+ SendStatus sendStatus = SmsUtil.sendSms(noticeEndpoint,
|
|
|
|
+ noticeRegion,
|
|
|
|
+ noticeSecretId,
|
|
|
|
+ noticeecretKey,
|
|
|
|
+ noticeSmsSdkAppId,
|
|
|
|
+ noticeSignName,
|
|
|
|
+ noticeTemplateId4ModifyPhone,
|
|
|
|
+ phone,_p);
|
|
|
|
+ if (sendStatus!=null && "Ok".equals(sendStatus.getCode())){
|
|
|
|
+ return true;
|
|
|
|
+ }else{
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public boolean sendSmsToLianxiren(String phone, String params) {
|
|
public boolean sendSmsToLianxiren(String phone, String params) {
|
|
String[] _p = {params};
|
|
String[] _p = {params};
|