| 构造器和说明 |
|---|
Template() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
delete(String code)
删除模板
|
SMSTemplate |
info(String code)
根据编号查询模板信息(主要查询审核状态)
|
List<SMSTemplate> |
list()
查询全部模板列表
|
List<SMSTemplate> |
list(boolean enable)
根据可用状态查询模板列表
|
List<SMSTemplate> |
list(int page) |
List<SMSTemplate> |
list(int page,
int vol)
分页查询模板列表
|
List<SMSTemplate> |
list(SMSTemplate.STATUS status)
根据状态查询模板列表
|
String |
request(String name,
int type,
String content,
String remark)
申请短信模板
|
boolean |
update(String code,
String name,
int type,
String content,
String remark)
修改未审核通过的模板(只能侯审核失败的,不能侯未审核及撤销的)
|
public String request(String name, int type, String content, String remark) throws RuntimeException
name - 名称type - 0:验证码 1:通知短信 2:推广短信content - 内容,如果type=1内容中需要有变量,如:${code}remark - 备注RuntimeException - RuntimeExceptionpublic 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 - remarkRuntimeException - RuntimeExceptionpublic List<SMSTemplate> list()
public List<SMSTemplate> list(SMSTemplate.STATUS status)
status - 状态public List<SMSTemplate> list(boolean enable)
enable - 是否可用public List<SMSTemplate> list(int page, int vol) throws RuntimeException
page - 当前第几页vol - 每页多少条RuntimeException - RuntimeExceptionpublic List<SMSTemplate> list(int page)
public SMSTemplate info(String code) throws RuntimeException
code - codeRuntimeException - RuntimeExceptionpublic boolean delete(String code) throws RuntimeException
code - 模板编号RuntimeException - RuntimeExceptionCopyright © 2024. All rights reserved.