Class ZhutongSmsProvider

java.lang.Object
org.miaixz.bus.notify.metric.AbstractProvider<ZhutongMaterial,Context>
org.miaixz.bus.notify.metric.zhutong.ZhutongSmsProvider
All Implemented Interfaces:
Provider<ZhutongMaterial>

public class ZhutongSmsProvider extends AbstractProvider<ZhutongMaterial,Context>
助通短信发送 1. 自定义短信发送 无需定义模板 https://doc.zthysms.com/web/#/1/14 2. 模板短信发送 需定义模板 https://doc.zthysms.com/web/#/1/13 appKey :username 助通终端用户管理的用户名,非登录账号密码 appSecret :password 终端用户管理的密码 signature :短信签名可以为空,为空发送【自定义短信】无需要提前创建短信模板; 不为空发送:【模板短信】 templateId :模板id可以为空,为空发送【自定义短信】无需要提前创建短信模板; 不为空发送:【模板短信】 templateName :模板变量名称可以为空,为空发送【自定义短信】无需要提前创建短信模板; 不为空发送:【模板短信】
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • ZhutongSmsProvider

      public ZhutongSmsProvider(Context context)
      构造器,用于构造短信实现模块
  • Method Details

    • send

      public org.miaixz.bus.core.basics.entity.Message send(ZhutongMaterial entity)
      Description copied from interface: Provider
      指定模版Material并发送 注意:不同等服务商使用的模版实现不同
      Specified by:
      send in interface Provider<ZhutongMaterial>
      Overrides:
      send in class AbstractProvider<ZhutongMaterial,Context>
      Parameters:
      entity - 通知内容
      Returns:
      发送结果
    • sendForCustom

      protected org.miaixz.bus.core.basics.entity.Message sendForCustom(ZhutongMaterial entity)
      发送 自定义短信:https://doc.zthysms.com/web/#/1/14
    • sendForTemplate

      protected org.miaixz.bus.core.basics.entity.Message sendForTemplate(ZhutongMaterial entity)
      发送 模板短信:https://doc.zthysms.com/web/#/1/13