类 AliCloudSmsUtils

java.lang.Object
com.cdkjframework.message.sms.aliyun.AliCloudSmsUtils
所有已实现的接口:
org.springframework.boot.ApplicationRunner

@Component public class AliCloudSmsUtils extends Object implements org.springframework.boot.ApplicationRunner
  • 字段详细资料

  • 构造器详细资料

    • AliCloudSmsUtils

      public AliCloudSmsUtils(SmsConfig smsConfig)
      构造函数
      参数:
      smsConfig - 短信配置
  • 方法详细资料

    • modifyTemplate

      public static SmsResponseEntity modifyTemplate(SmsTemplateEntity smsTemplate)
      修改短信模板
      参数:
      smsTemplate - 短信模板
      返回:
      返回结果
    • deleteTemplate

      public static SmsResponseEntity deleteTemplate(SmsTemplateEntity smsTemplate)
      修改短信模板
      参数:
      smsTemplate - 短信模板
      返回:
      返回结果
    • addTemplate

      public static SmsResponseEntity addTemplate(SmsTemplateEntity smsTemplate)
      添加短信模板
      参数:
      smsTemplate - 短信模板
      返回:
      返回结果
    • addSign

      public static SmsResponseEntity addSign(SmsSignEntity smsSign)
      添加短信签名
      参数:
      smsSign - 短信签名
      返回:
      返回结果
    • modifySign

      public static SmsResponseEntity modifySign(SmsSignEntity smsSign)
      修改短信签名
      参数:
      smsSign - 短信签名
      返回:
      返回结果
    • deleteSign

      public static SmsResponseEntity deleteSign(SmsSignEntity smsSign)
      删除短信签名
      参数:
      smsSign - 短信签名
      返回:
      返回结果
    • sendSms

      public static SmsResponseEntity sendSms(SendSmsEntity sendSms) throws Exception
      发送短信
      参数:
      sendSms - 短信消息内容
      返回:
      返回结果 数据为查询短信详情
      抛出:
      com.aliyuncs.exceptions.ClientException - 异常信息
      Exception
    • sendBatchSms

      public static SmsResponseEntity sendBatchSms(SendSmsEntity sendSms) throws Exception
      批量发送短信
      参数:
      sendSms - 短信消息内容
      返回:
      返回结果 数据为查询短信详情
      抛出:
      com.aliyuncs.exceptions.ClientException - 异常信息
      Exception
    • createClient

      public static com.aliyun.dysmsapi20170525.Client createClient() throws Exception
      使用AK&SK\u521d\u59cb\u5316\u8d26\u53f7Client
      返回:
      Client 客户端
      抛出:
      Exception - 异常信息
    • run

      public void run(org.springframework.boot.ApplicationArguments args) throws Exception
      初始化
      指定者:
      run 在接口中 org.springframework.boot.ApplicationRunner
      参数:
      args - 参数
      抛出:
      Exception - 异常信息