类 SMSUtil.Template

java.lang.Object
org.anyline.aliyun.sms.util.SMSUtil.Template
封闭类:
SMSUtil

public class SMSUtil.Template extends Object
  • 构造器详细资料

    • Template

      public Template()
  • 方法详细资料

    • request

      public String request(String name, int type, String content, String remark) throws RuntimeException
      申请短信模板
      参数:
      name - 名称
      type - 0:验证码 1:通知短信 2:推广短信
      content - 内容,如果type=1内容中需要有变量,如:${code}
      remark - 备注
      返回:
      返回模板编号 SMS_000000
      抛出:
      RuntimeException - RuntimeException
    • update

      public boolean update(String code, String name, int type, String content, String remark) throws RuntimeException
      修改未审核通过的模板(只能侯审核失败的,不能侯未审核及撤销的)
      参数:
      code - request()返回的编号
      name - 名称
      type - 0:验证码 1:通知短信 2:推广短信
      content - 内容,如果type=1内容中需要有变量,如:${code}
      remark - remark
      返回:
      boolean
      抛出:
      RuntimeException - RuntimeException
    • list

      public List<SMSTemplate> list()
      查询全部模板列表
      返回:
      list
    • list

      public List<SMSTemplate> list(SMSTemplate.STATUS status)
      根据状态查询模板列表
      参数:
      status - 状态
      返回:
      List
    • list

      public List<SMSTemplate> list(boolean enable)
      根据可用状态查询模板列表
      参数:
      enable - 是否可用
      返回:
      List
    • list

      public List<SMSTemplate> list(int page, int vol) throws RuntimeException
      分页查询模板列表
      参数:
      page - 当前第几页
      vol - 每页多少条
      返回:
      list
      抛出:
      RuntimeException - RuntimeException
    • list

      public List<SMSTemplate> list(int page)
    • info

      public SMSTemplate info(String code) throws RuntimeException
      根据编号查询模板信息(主要查询审核状态)
      参数:
      code - code
      返回:
      SMSTemplate
      抛出:
      RuntimeException - RuntimeException
    • delete

      public boolean delete(String code) throws RuntimeException
      删除模板
      参数:
      code - 模板编号
      返回:
      boolean
      抛出:
      RuntimeException - RuntimeException