Commit afe93938 authored by wp's avatar wp

修改短信模板为一幕影链

parent a00ce1ad
......@@ -97,7 +97,7 @@ public class SmsController {
switch (Objects.requireNonNull(CodeTypeEnum.getByType(type))) {
case REGISTER:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.MERCHANT_REGISTER;
redisKey = MALLGlobalConfig.PHONE_CODE_MERCHANT_REGISTER_REDIS_KEY_SUFFIX;
break;
case SEARCH:
......@@ -106,12 +106,12 @@ public class SmsController {
break;
case REPAIR_PWD:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.REPAIR_PWD;
redisKey = MALLGlobalConfig.PHONE_CODE_REPAIR_PWD_REDIS_KEY_SUFFIX;
break;
case AUTHENTICATION:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.RESET_PWD;
redisKey = MALLGlobalConfig.PHONE_CODE_IDENTITY_REDIS_KEY_SUFFIX;
break;
}
......
......@@ -36,8 +36,6 @@ public class AliSmsUtils {
// 重置密码
public static String RESET_PWD = "SMS_225125100";
public static String tempId = "SMS_226745226";
public static boolean sendCode(String mobile, String code, String tplId, boolean isMsg) {
//设置超时时间-可自行调整
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
......@@ -46,8 +44,8 @@ public class AliSmsUtils {
final String product = "Dysmsapi";//短信API产品名称(短信产品名固定,无需修改)
final String domain = "dysmsapi.aliyuncs.com";//短信API产品域名(接口地址固定,无需修改)
//替换成你的AK
final String accessKeyId = "LTAI5tD9SPnwKjaAzywQEvde";//你的accessKeyId,参考本文档步骤2+
final String accessKeySecret = "Mm1R0sVS10IrRBsNIEvJpLQRj4tOjj";//你的accessKeySecret,参考本文档步骤2
final String accessKeyId = "LTAI5tKnkYvSprbF26n7FZN3";//你的accessKeyId,参考本文档步骤2+
final String accessKeySecret = "kxJfWPa03WSTBsRvj7n2bYeBsdWBgY";//你的accessKeySecret,参考本文档步骤2
//初始化ascClient,暂时不支持多region(请勿修改)
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId,
accessKeySecret);
......@@ -66,7 +64,7 @@ public class AliSmsUtils {
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为国际区号+号码,如“85200000000”
request.setPhoneNumbers(mobile);
//必填:短信签名-可在短信控制台中找到
request.setSignName("浙娱");
request.setSignName("一幕影链");
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
request.setTemplateCode(tplId);
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment