|
@@ -30,6 +30,7 @@ public class AliyunSmsUtil {
|
|
|
*/
|
|
|
public static boolean sendSms(String mobile, Integer type, String templateParam) {
|
|
|
String templateCode = null;
|
|
|
+ String signName = "采美";
|
|
|
if (null == type || type<0) {
|
|
|
return false;
|
|
|
} else if (type == 0) {
|
|
@@ -51,14 +52,12 @@ public class AliyunSmsUtil {
|
|
|
// 模版内容: 验证码${code},您正在进行身份验证,打死不要告诉别人哦!
|
|
|
templateCode = "SMS_205240544";
|
|
|
} else if (type == 6) {
|
|
|
-// 模版内容: 欢迎成为采美会员机构用户,您的登录账号为:${name},初始密码为:${password}。
|
|
|
-// templateCode = "SMS_205430877";
|
|
|
-
|
|
|
// 模版内容: 欢迎成为采美机构用户,您的登录账号为:${name},初始密码为:cm${content},您可使用该账号密码登录采美365网和“采美采购商城”小程序。
|
|
|
templateCode = "SMS_215122672";
|
|
|
-// } else if (type == 7) {
|
|
|
-// // 模版内容: 欢迎成为采美普通机构用户,您的登录账号为:${name},初始密码为:${password},您可使用该账号密码登录采美365网和“采美采购商城”小程序。
|
|
|
-// templateCode = "SMS_205440777";
|
|
|
+ } else if (type == 7) {
|
|
|
+ // 模版内容: 您的短信验证码为:${code}。
|
|
|
+ templateCode = "SMS_215344905";
|
|
|
+ signName = "呵呵商城";
|
|
|
} else if (type == 8) {
|
|
|
// 模版内容: 欢迎注册采美365网,您的短信验证码为:${code},该验证码 5 分钟内有效,请勿泄漏于他人。
|
|
|
templateCode = "SMS_205435882";
|
|
@@ -95,7 +94,7 @@ public class AliyunSmsUtil {
|
|
|
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为国际区号+号码,如“85200000000”
|
|
|
request.setPhoneNumbers(mobile);
|
|
|
//必填:短信签名-可在短信控制台中找到
|
|
|
- request.setSignName("采美");
|
|
|
+ request.setSignName(signName);
|
|
|
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
|
|
|
request.setTemplateCode(templateCode);
|
|
|
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为{\"name\":\"Tom\", \"code\":\"123\"}";
|