public class TemplateMessageProxy extends MPlatformProxy
Description:
tokenManagerweixinRequestClient| 构造器和说明 |
|---|
TemplateMessageProxy(TokenManager tokenManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
ApiResult |
deleteTemplate(String templateId)
删除模板
|
List<TemplateMessageInfo> |
getAllTemplates()
获取模板列表
|
String |
getTemplateId(String shortId)
获取模板ID
|
IndustryType[] |
getTemplateIndustry()
获取设置的行业信息
|
String |
sendTemplateMessage(TemplateMessage tplMessage)
发送模板消息
|
ApiResult |
setTemplateIndustry(IndustryType... industryTypes)
设置所属行业(每月可修改行业1次,账号仅可使用所属行业中相关的模板)
|
getTokenManagerpublic TemplateMessageProxy(TokenManager tokenManager)
public ApiResult setTemplateIndustry(IndustryType... industryTypes) throws WeixinException
industryTypes - 所处行业 目前不超过两个WeixinExceptionIndustryType,
设置所处行业public IndustryType[] getTemplateIndustry() throws WeixinException
WeixinExceptionIndustryType,
获取设置的行业信息public String getTemplateId(String shortId) throws WeixinException
shortId - 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式WeixinExceptionpublic List<TemplateMessageInfo> getAllTemplates() throws WeixinException
WeixinExceptionTemplateMessageInfo,
获取模板列表public ApiResult deleteTemplate(String templateId) throws WeixinException
templateId - 公众帐号下模板消息IDWeixinExceptionpublic String sendTemplateMessage(TemplateMessage tplMessage) throws WeixinException
tplMessage - 消息对象WeixinExceptionTemplateMessageCopyright © 2020. All rights reserved.