| | |
| | | * @date 2023 2023/8/6 12:48 |
| | | */ |
| | | |
| | | |
| | | |
| | | |
| | | public class MsgUtils { |
| | | |
| | | |
| | | public static void sendMsg(String phoneNumber,Integer sendType,String sendContent) throws Exception { |
| | | |
| | | StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder() |
| | | .accessKeyId(System.getenv("LTAI5tAfKFuhyKFH12CTkXFj")) |
| | | .accessKeySecret(System.getenv("tIBRuonHuQQPdcYrmlCdXlexOSwVXe")) |
| | | .accessKeyId("LTAI5tAfKFuhyKFH12CTkXFj") |
| | | .accessKeySecret("tIBRuonHuQQPdcYrmlCdXlexOSwVXe") |
| | | .build()); |
| | | |
| | | AsyncClient client = AsyncClient.builder() |
| | |
| | | SendSmsRequest sendSmsRequest = SendSmsRequest.builder() |
| | | .phoneNumbers(phoneNumber) |
| | | .signName("鸿瑞堂") |
| | | .templateCode("SMS_234035865") |
| | | .build(); |
| | | |
| | | CompletableFuture<SendSmsResponse> response = client.sendSms(sendSmsRequest); |