短信配置修改
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.ho.common.tools.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.auth.credentials.Credential;
|
||||
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
|
||||
import com.aliyun.sdk.service.dysmsapi20170525.AsyncClient;
|
||||
@ -8,6 +9,7 @@ import com.aliyun.sdk.service.dysmsapi20170525.models.SendBatchSmsResponse;
|
||||
import com.aliyun.sdk.service.dysmsapi20170525.models.SendSmsRequest;
|
||||
import com.aliyun.sdk.service.dysmsapi20170525.models.SendSmsResponse;
|
||||
import com.google.gson.Gson;
|
||||
import com.ho.common.tools.constant.CommonConstant;
|
||||
import darabonba.core.client.ClientOverrideConfiguration;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ -19,9 +21,9 @@ import java.util.concurrent.CompletableFuture;
|
||||
@Slf4j
|
||||
public class AliSendSmsUtils {
|
||||
|
||||
private static final String accessKeyId = "LTAI5tCQyHiB3ww1dKhVhedx";
|
||||
private static final String accessKeyId = "LTAI5tPYLepNVpMUKrVTjQ2m";
|
||||
|
||||
private static final String accessKeySecret = "tvovJTgBVhn93rWcWTcoFekLrqHSCN";
|
||||
private static final String accessKeySecret = "KUQBA9gNwevv5wslgoNxyB6rOu9glB";
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
@ -30,7 +32,7 @@ public class AliSendSmsUtils {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void sendMessage(String param,String phoneNumbers) throws Exception{
|
||||
sendMessage("弘正储能","SMS_463325018",param,phoneNumbers);
|
||||
sendMessage("中自科技","SMS_495990996",param,phoneNumbers);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,7 +42,7 @@ public class AliSendSmsUtils {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void sendFlowMessage(String param,String phoneNumbers) throws Exception{
|
||||
sendMessage("弘正储能","SMS_463625526",param,phoneNumbers);
|
||||
sendMessage("中自科技","SMS_495990996",param,phoneNumbers);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,11 +122,10 @@ public class AliSendSmsUtils {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
// JSONObject param = new JSONObject();
|
||||
// param.put(CommonConstant.SMS.SITE_NAME,"test");
|
||||
// param.put(CommonConstant.SMS.SITE_NAME,"绿服酒店站");
|
||||
// param.put(CommonConstant.SMS.CONTENT,CommonConstant.Heartbeat.STATION_FAIL);
|
||||
// param.put(CommonConstant.SMS.NAME,"json");
|
||||
// sendMessage(param.toJSONString(),"");
|
||||
// param.put(CommonConstant.SMS.NAME,"邹");
|
||||
// sendMessage(param.toJSONString(),"18583239880");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user