Commit c2dc27ef authored by 秦兴亮's avatar 秦兴亮

短信模板修改

parent 32c8e97f
......@@ -25,7 +25,8 @@ public class AliSmsUtils {
public static String WITHDRAW = "SMS_224356728";
public static String tempId = "SMS_226745226";
public static String tempId = "SMS_197465258";
public static boolean sendCode(String mobile, String code , String tplId) {
......@@ -36,8 +37,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);
......@@ -56,7 +57,7 @@ public class AliSmsUtils {
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为国际区号+号码,如“85200000000”
request.setPhoneNumbers(mobile);
//必填:短信签名-可在短信控制台中找到
request.setSignName("浙娱");
request.setSignName("一幕影链");
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
//TODO 回头换成tplId
request.setTemplateCode(tempId);
......@@ -87,7 +88,4 @@ public class AliSmsUtils {
return false;
}
public static void main(String[] args) {
sendCode("13083458852","9999","SMS_226745226");
}
}
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