public class WeixinMPlatformProxy extends Object
Description:
| 构造器和说明 |
|---|
WeixinMPlatformProxy(TicketPermanentManager perTicketManager,
TokenManager componentTokenManager,
String userAuthRedirectUrl,
String openUserAuthRedirctUrl)
第三方组件方式创建微信接口实现(永久刷新令牌机制)
|
WeixinMPlatformProxy(WeixinAccount weixinAccount,
AbstractCacheStorager<Token> cacheStorager)
微信接口实现
|
| 限定符和类型 | 方法和说明 |
|---|---|
ApiResult |
batchBlacklist(boolean blacklist,
String... openIds)
黑名单操作
|
ApiResult |
clearQuota()
接口调用次数调用清零:公众号调用接口并不是无限制的。
|
ApiResult |
closeCustomSession(String userOpenId,
String kfAccount,
String text)
关闭客服会话
|
MediaCounter |
countMaterialMedia()
获取永久媒体素材的总数
.图片和图文消息素材(包括单图文和多图文)的总数上限为5000,其他素材的总数上限为1000
|
String |
createCardCoupon(CardCoupon cardCoupon)
创建卡券:创建卡券接口是微信卡券的基础接口,用于创建一类新的卡券,获取card_id,创建成功并通过审核后,
商家可以通过文档提供的其他接口将卡券下发给用户,每次成功领取,库存数量相应扣除。
|
QrcodeResult |
createCardQR(Integer expireSeconds,
CardQR... cardQRs)
创建卡券二维码: 开发者可调用该接口生成一张卡券二维码供用户扫码后添加卡券到卡包。
|
ApiResult |
createCustomAccount(String id,
String name)
新增客服账号
|
String |
createCustomMenu(List<Button> buttons,
MenuMatchRule matchRule)
创建个性化菜单
|
ApiResult |
createCustomSession(String userOpenId,
String kfAccount,
String text)
创建客服会话
开发者可以使用本接口,为多客服的客服工号创建会话,将某个客户直接指定给客服工号接待,需要注意此接口不会受客服自动接入数以及自动接入开关限制。
|
ApiResult |
createMenu(List<Button> buttons)
自定义菜单
|
QrcodeResult |
createQrcode(QrcodeParameter parameter)
生成带参数的二维码
|
Tag |
createTag(String name)
创建标签
|
List<?> |
datacube(DatacubeType datacubeType,
Date date)
查询日期跨度为0的统计数据(当天)
|
List<?> |
datacube(DatacubeType datacubeType,
Date beginDate,
Date endDate)
数据统计
|
List<?> |
datacube(DatacubeType datacubeType,
Date beginDate,
int offset)
数据统计
|
List<?> |
datacube(DatacubeType datacubeType,
int offset,
Date endDate)
数据统计
|
ApiResult |
deleteComment(String msgid,
int index,
String commentId)
删除评论
|
ApiResult |
deleteCommentReply(String msgid,
int index,
String commentId)
删除回复
|
ApiResult |
deleteCustomAccount(String id)
删除客服账号
|
ApiResult |
deleteCustomMenu(String menuId)
删除个性化菜单
|
ApiResult |
deleteMaterialMedia(String mediaId)
删除永久媒体素材
|
ApiResult |
deleteMenu()
删除菜单
|
ApiResult |
deleteMessageNews(String msgid)
删除群发消息
|
ApiResult |
deleteMessageNews(String msgid,
int articleIndex)
删除群发消息
请注意,只有已经发送成功的消息才能删除删除消息只是将消息的图文详情页失效,已经收到的用户,还是能在其本地看到消息卡片
|
ApiResult |
deleteTag(int tagId)
删除标签
|
ApiResult |
deleteTemplate(String templateId)
删除模板
|
List<MpArticle> |
downloadArticle(String mediaId)
下载永久图文素材
|
MediaDownloadResult |
downloadMedia(String mediaId,
boolean isMaterial)
下载媒体文件
|
List<String> |
getAllBalcklistOpenIds()
获取公众号全部的黑名单列表 请慎重使用
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求,
将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
|
List<User> |
getAllFollowing()
获取公众号全部的关注者列表 请慎重使用
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求,
将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
|
List<String> |
getAllFollowingOpenIds()
获取公众号全部的关注者列表 请慎重使用
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求,
将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
|
List<Menu> |
getAllMenu()
查询全部菜单(包含个性化菜单)
|
List<User> |
getAllTagFollowing(int tagId)
获取标签下全部的粉丝列表 请慎重使用
|
List<String> |
getAllTagFollowingOpenIds(int tagId)
获取标签下全部的粉丝列表 请慎重使用
|
List<TemplateMessageInfo> |
getAllTemplates()
获取模板列表
|
ArticleProxy |
getArticleProxy() |
AutoReplySetting |
getAutoReplySetting()
获取公众号当前使用的自动回复规则,包括关注后自动回复、消息自动回复(60分钟内触发一次)、关键词自动回复。
|
Following |
getBalcklistOpenIds(String nextOpenId)
获取公众号的黑名单列表
|
CardProxy |
getCardProxy() |
List<CustomChatRecord> |
getCustomChatRecord(Date startTime,
Date endTime,
int number)
客服聊天记录
|
CustomProxy |
getCustomProxy() |
CustomChatSession |
getCustomSession(String userOpenId)
获取客户的会话状态:获取客户当前的会话状态。
|
DataProxy |
getDataProxy() |
Following |
getFollowing(String nextOpenId)
获取公众号一定数量(10000)的关注者列表 请慎重使用
|
Following |
getFollowingOpenIds(String nextOpenId)
获取公众号一定数量(10000)的关注者列表
|
MediaProxy |
getMediaProxy() |
List<Button> |
getMenu()
查询菜单
|
MenuProxy |
getMenuProxy() |
MenuSetting |
getMenuSetting()
获取公众号当前使用的自定义菜单的配置,如果公众号是通过API调用设置的菜单,则返回菜单的开发配置,
而如果公众号是在公众平台官网通过网站功能发布菜单,则本接口返回运营者设置的菜单配置。
|
String |
getMessageNewStatus(String msgId)
查询群发发送状态
|
MessageProxy |
getMessageProxy() |
NotifyProxy |
getNotifyProxy() |
OauthProxy |
getOauthProxy() |
QrcodeProxy |
getQrcodeProxy() |
ShakeProxy |
getShakeProxy() |
String |
getShorturl(String url)
长链接转短链接
|
Following |
getTagFollowing(int tagId,
String nextOpenId)
获取标签下粉丝列表 请慎重使用
|
Following |
getTagFollowingOpenIds(int tagId,
String nextOpenId)
获取标签下粉丝列表
|
TagProxy |
getTagProxy() |
String |
getTemplateId(String shortId)
获取模板ID
|
TemplateMessageProxy |
getTemplateMessageProxy() |
TokenManager |
getTicketManager(TicketType ticketType)
获取JSSDK Ticket的tokenManager
|
TokenManager |
getTokenManager()
token管理
|
ToolsProxy |
getToolsProxy() |
User |
getUser(String openId)
获取用户信息
|
User |
getUser(String openId,
Lang lang)
获取用户信息
在关注者与公众号产生消息交互后,公众号可获得关注者的OpenID(加密后的微信号,每个用户对每个公众号的OpenID是唯一的,对于不同公众号,
同一用户的openid不同),公众号可通过本接口来根据OpenID获取用户基本信息,包括昵称、头像、性别、所在城市、语言和关注时间
|
UserProxy |
getUserProxy() |
List<User> |
getUsers(Lang lang,
String... openIds)
批量获取用户信息
|
List<User> |
getUsers(String... openIds)
批量获取用户信息
|
Integer[] |
getUserTags(String openId)
获取用户身上的标签列表
|
List<String> |
getWechatServerIp()
获取微信服务器IP地址
|
WeixinAccount |
getWeixinAccount()
获取微信账号信息
|
ApiResult |
inviteKfAccount(String kfAccount,
String inviteAccount)
邀请绑定客服帐号
新添加的客服帐号是不能直接使用的,只有客服人员用微信号绑定了客服账号后,方可登录Web客服进行操作。
|
List<ArticleComment> |
listAllArticleComments(ArticleComment.ArticleCommentType commentType,
String msgid,
int index)
获取评论列表
|
List<MediaItem> |
listAllMaterialMedia(MediaType mediaType)
获取全部的媒体素材
|
PageData<ArticleComment> |
listArticleComments(Pageable page,
ArticleComment.ArticleCommentType commentType,
String msgid,
int index)
获取评论列表
|
List<CustomAccount> |
listCustomAccount()
获取公众号中所设置的客服基本信息,包括客服工号、客服昵称、客服登录账号
|
List<CustomChatSession> |
listCustomSession(String kfAccount)
获取客服的会话列表:获取某个客服正在接待的会话列表。
|
CustomChatSession.CustomChatSessionCounter |
listCustomWaitSession()
获取未接入会话列表:获取当前正在等待队列中的会话列表,此接口最多返回最早进入队列的100个未接入会话
|
MediaRecord |
listMaterialMedia(MediaType mediaType,
Pageable pageable)
获取媒体素材记录列表
|
List<CustomOnlineAccount> |
listOnlineCustomAccount()
获取在线客服在线状态(手机在线、PC客户端在线、手机和PC客户端全都在线)、客服自动接入最大值、 客服当前接待客户数
|
List<Tag> |
listTags()
获取标签
|
ApiResult |
markelectComment(boolean markelect,
String msgid,
int index,
String commentId)
评论标记/取消精选
|
List<Button> |
matchCustomMenu(String userId)
测试个性化菜单匹配结果
|
String[] |
messageArticleByGroupId(List<MpArticle> articles,
int groupId)
分组ID群发图文消息
|
String[] |
messageArticleByOpenIds(List<MpArticle> articles,
boolean ignoreReprint,
String... openIds)
openid群发图文消息
|
String[] |
messageArticleByTagId(List<MpArticle> articles,
int tagId,
boolean ignoreReprint)
标签群发图文消息
|
String[] |
messageByGroupId(MultiMessageTuple tuple,
boolean isToAll,
int groupId)
群发消息
在返回成功时,意味着群发任务提交成功,并不意味着此时群发已经结束,所以,仍有可能在后续的发送过程中出现异常情况导致用户未收到消息,
如消息有时会进行审核、服务器不稳定等,此外,群发任务一般需要较长的时间才能全部发送完毕
|
String[] |
messageByOpenIds(MultiMessageTuple tuple,
String... openIds)
openId群发消息
|
String[] |
messageByTagId(MultiMessageTuple tuple,
int tagId)
标签群发消息
|
String[] |
messageToAll(MultiMessageTuple tuple)
群发消息给所有粉丝
|
ApiResult |
openComment(boolean open,
String msgid,
int index)
打开/关闭已群发文章评论
|
ApiResult |
previewMessageNews(String toUser,
String toWxName,
MultiMessageTuple tuple)
预览群发消息
开发者可通过该接口发送消息给指定用户,在手机端查看消息的样式和排版
|
ApiResult |
remarkUserName(String openId,
String remark)
设置用户备注名
|
ApiResult |
replyComment(String msgid,
int index,
String commentId,
String content)
回复评论
|
SemResult |
semantic(SemQuery semQuery)
语义理解
|
ApiResult |
sendNotify(NotifyMessage notify)
发送客服消息(在48小时内不限制发送次数)
|
ApiResult |
sendNotify(NotifyMessage notify,
String kfAccount)
发送客服消息(在48小时内不限制发送次数)
|
String |
sendTmplMessage(TemplateMessage tplMessage)
发送模板消息
|
ApiResult |
setCardPayCell(String cardId,
boolean isOpen)
设置卡券买单:创建卡券之后,开发者可以通过设置微信买单接口设置该card_id支持微信买单功能。
|
ApiResult |
setCardSelfConsumeCell(String cardId,
boolean isOpen)
设置自助核销:创建卡券之后,开发者可以通过设置微信买单接口设置该card_id支持自助核销功能。
|
ApiResult |
setTmplIndustry(IndustryType... industryTypes)
设置所属行业(每月可修改行业1次,账号仅可使用所属行业中相关的模板)
|
ApiResult |
taggingUsers(int tagId,
String... openIds)
批量为用户打标签:标签功能目前支持公众号为用户打上最多三个标签
|
ApiResult |
untaggingUsers(int tagId,
String... openIds)
批量为用户取消标签
|
ApiResult |
updateCustomAccount(String id,
String name)
更新客服账号
|
ApiResult |
updateMaterialArticle(String mediaId,
int index,
MpArticle article)
更新永久图文素材
|
ApiResult |
updateTag(Tag tag)
更新标签
|
ApiResult |
uploadCustomAvatar(String accountId,
InputStream is,
String fileName)
上传客服头像
|
String |
uploadImage(InputStream is,
String fileName)
上传图文消息内的图片获取URL
请注意,本接口所上传的图片不占用公众号的素材库中图片数量的5000个的限制。
|
String |
uploadMaterialArticle(List<MpArticle> articles)
上传永久图文素材
、新增的永久素材也可以在公众平台官网素材管理模块中看到,永久素材的数量是有上限的,请谨慎新增。
|
String |
uploadMaterialVideo(InputStream is,
String fileName,
String title,
String introduction)
上传永久视频素材
|
MediaUploadResult |
uploadMedia(boolean isMaterial,
InputStream is,
String fileName)
上传媒体文件
此接口只包含图片、语音、缩略图、视频(临时)四种媒体类型的上传
|
String |
uploadMessageArticle(List<MpArticle> articles)
上传群发的图文消息,一个图文消息支持1到10条图文
|
MpVideoMessageTuple |
uploadVideo(InputStream is,
String fileName,
String title,
String description)
上传群发中的视频素材
|
public WeixinMPlatformProxy(WeixinAccount weixinAccount, AbstractCacheStorager<Token> cacheStorager)
weixinAccount - 账号信息cacheStorager - token管理public WeixinMPlatformProxy(TicketPermanentManager perTicketManager, TokenManager componentTokenManager, String userAuthRedirectUrl, String openUserAuthRedirctUrl)
perTicketManager - 第三方组件永久刷新tokencomponentTokenManager - 第三方组件凭证tokenComponentProxy,
ComponentProxy.getPreCodeManager(),
MPlatformProxy.getTokenManager()public WeixinAccount getWeixinAccount()
public TokenManager getTokenManager()
public TokenManager getTicketManager(TicketType ticketType)
ticketType - 票据类型public OauthProxy getOauthProxy()
public MediaProxy getMediaProxy()
public NotifyProxy getNotifyProxy()
public ArticleProxy getArticleProxy()
public CardProxy getCardProxy()
public CustomProxy getCustomProxy()
public DataProxy getDataProxy()
public MenuProxy getMenuProxy()
public MessageProxy getMessageProxy()
public QrcodeProxy getQrcodeProxy()
public ShakeProxy getShakeProxy()
public TagProxy getTagProxy()
public TemplateMessageProxy getTemplateMessageProxy()
public UserProxy getUserProxy()
public ToolsProxy getToolsProxy()
public String uploadImage(InputStream is, String fileName) throws WeixinException
is - 图片数据流fileName - 文件名 为空时将自动生成WeixinExceptionpublic MpVideoMessageTuple uploadVideo(InputStream is, String fileName, String title, String description) throws WeixinException
is - 图片数据流fileName - 文件名 为空时将自动生成title - 视频标题 非空description - 视频描述 可为空WeixinExceptionMpVideoMessageTuplepublic MediaUploadResult uploadMedia(boolean isMaterial, InputStream is, String fileName) throws WeixinException
isMaterial - 是否永久上传is - 媒体数据流fileName - 文件名 为空时将自动生成WeixinExceptionMediaUploadResult,
MediaTypepublic MediaDownloadResult downloadMedia(String mediaId, boolean isMaterial) throws WeixinException
mediaId - 媒体IDisMaterial - 是否永久素材WeixinExceptionMediaDownloadResult,
下载临时媒体素材,
下载永久媒体素材public String uploadMaterialArticle(List<MpArticle> articles) throws WeixinException
、新增的永久素材也可以在公众平台官网素材管理模块中看到,永久素材的数量是有上限的,请谨慎新增。图文消息素材和图片素材的上限为5000, 其他类型为1000
articles - 图文列表WeixinExceptionMpArticle,
上传永久媒体素材public List<MpArticle> downloadArticle(String mediaId) throws WeixinException
mediaId - 媒体IDWeixinExceptionMpArticlepublic ApiResult updateMaterialArticle(String mediaId, int index, MpArticle article) throws WeixinException
mediaId - 要修改的图文消息的idindex - 要更新的文章在图文消息中的位置(多图文消息时,此字段才有意义),第一篇为0article - 图文对象WeixinExceptionMediaProxy,
MpArticle,
更新永久图文素材public ApiResult deleteMaterialMedia(String mediaId) throws WeixinException
mediaId - 媒体素材的media_idWeixinExceptionMediaProxy,
删除永久媒体素材public String uploadMaterialVideo(InputStream is, String fileName, String title, String introduction) throws WeixinException
is - 大小不超过1M且格式为MP4的视频文件fileName - 文件名 为空时将自动生成title - 视频标题introduction - 视频描述WeixinExceptionpublic MediaCounter countMaterialMedia() throws WeixinException
WeixinExceptionMediaCounter,
获取素材总数public MediaRecord listMaterialMedia(MediaType mediaType, Pageable pageable) throws WeixinException
mediaType - 素材的类型,图片(image)、视频(video)、语音 (voice)、图文(news)pageable - 分页数据WeixinExceptionMediaRecord,
MediaType,
MediaItem,
Pageable,
PageData,
获取素材列表public List<MediaItem> listAllMaterialMedia(MediaType mediaType) throws WeixinException
mediaType - 媒体类型WeixinExceptionpublic ApiResult sendNotify(NotifyMessage notify) throws WeixinException
notify - 客服消息对象WeixinExceptionpublic ApiResult sendNotify(NotifyMessage notify, String kfAccount) throws WeixinException
notify - 客服消息对象kfAccount - 客服账号 可为空WeixinExceptionTextMessageTuple,
ImageMessageTuple,
VoiceMessageTuple,
VideoMessageTuple,
MusicMessageTuple,
NewsMessageTuple,
NotifyProxypublic List<CustomChatRecord> getCustomChatRecord(Date startTime, Date endTime, int number) throws WeixinException
startTime - 查询开始时间endTime - 查询结束时间 每次查询不能跨日查询number - 最多10000条WeixinExceptionCustomChatRecord,
CustomProxy,
查询客服聊天记录,
查询客服聊天记录public List<CustomAccount> listCustomAccount() throws WeixinException
WeixinExceptionCustomAccount,
CustomProxy,
获取客服基本信息public List<CustomOnlineAccount> listOnlineCustomAccount() throws WeixinException
WeixinExceptionCustomOnlineAccount,
CustomProxy,
获取客服在线信息public ApiResult createCustomAccount(String id, String name) throws WeixinException
id - 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,
请前往微信公众平台设置。name - 客服昵称,最长6个汉字或12个英文字符WeixinException客服管理接口返回码
public ApiResult updateCustomAccount(String id, String name) throws WeixinException
id - 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,
请前往微信公众平台设置。name - 客服昵称,最长6个汉字或12个英文字符WeixinExceptionCustomProxy,
更新客服账号public ApiResult inviteKfAccount(String kfAccount, String inviteAccount) throws WeixinException
kfAccount - 完整客服帐号,格式为:帐号前缀@公众号微信号inviteAccount - 接收绑定邀请的客服微信号WeixinExceptionpublic ApiResult uploadCustomAvatar(String accountId, InputStream is, String fileName) throws WeixinException
accountId - 完整客服账号,格式为:账号前缀@公众号微信号is - 头像图片文件必须是jpg格式,推荐使用640*640大小的图片以达到最佳效果fileName - 文件名 为空时将自动生成WeixinExceptionCustomProxy,
上传客服头像public ApiResult deleteCustomAccount(String id) throws WeixinException
id - 完整客服账号,格式为:账号前缀@公众号微信号WeixinExceptionCustomProxy,
删除客服账号public ApiResult createCustomSession(String userOpenId, String kfAccount, String text) throws WeixinException
开发者可以使用本接口,为多客服的客服工号创建会话,将某个客户直接指定给客服工号接待,需要注意此接口不会受客服自动接入数以及自动接入开关限制。 只能为在线的客服(PC客户端在线,或者已绑定多客服助手)创建会话。
userOpenId - 用户的userOpenIdkfAccount - 完整客服账号,格式为:账号前缀@公众号微信号text - 附加信息,文本会展示在客服人员的多客服客户端WeixinExceptionCustomProxy,
创建会话public ApiResult closeCustomSession(String userOpenId, String kfAccount, String text) throws WeixinException
userOpenId - 用户的userOpenIdkfAccount - 完整客服账号,格式为:账号前缀@公众号微信号text - 附加信息,文本会展示在客服人员的多客服客户端WeixinExceptionCustomProxy,
关闭会话public CustomChatSession getCustomSession(String userOpenId) throws WeixinException
userOpenId - 用户的openidWeixinExceptionCustomProxy,
CustomChatSession,
获取会话状态public List<CustomChatSession> listCustomSession(String kfAccount) throws WeixinException
kfAccount - 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。WeixinExceptionCustomProxy,
CustomChatSession,
获取客服的会话列表public CustomChatSession.CustomChatSessionCounter listCustomWaitSession() throws WeixinException
WeixinExceptionCustomProxy,
CustomChatSession,
CustomChatSession.CustomChatSessionCounter,
获取客服的会话列表public String uploadMessageArticle(List<MpArticle> articles) throws WeixinException
articles - 图片消息WeixinExceptionMpArticle,
MessageProxypublic String[] messageByGroupId(MultiMessageTuple tuple, boolean isToAll, int groupId) throws WeixinException
在返回成功时,意味着群发任务提交成功,并不意味着此时群发已经结束,所以,仍有可能在后续的发送过程中出现异常情况导致用户未收到消息, 如消息有时会进行审核、服务器不稳定等,此外,群发任务一般需要较长的时间才能全部发送完毕
tuple - 消息元件isToAll - 用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户,
选择false可根据group_id发送给指定群组的用户groupId - 分组IDWeixinExceptionTextMessageTuple,
ImageMessageTuple,
VoiceMessageTuple,
VideoMessageTuple,
MpNewsMessageTuple,
MessageProxy,
MultiMessageTuple,
根据分组群发public String[] messageArticleByGroupId(List<MpArticle> articles, int groupId) throws WeixinException
articles - 图文列表groupId - 分组IDWeixinExceptionMpArticlepublic String[] messageToAll(MultiMessageTuple tuple) throws WeixinException
tuple - 消息元件WeixinExceptionMessageProxy,
根据标签群发public String[] messageByTagId(MultiMessageTuple tuple, int tagId) throws WeixinException
tuple - 消息元件tagId - 标签IDWeixinExceptionTag,
MessageProxy,
根据标签群发public String[] messageArticleByTagId(List<MpArticle> articles, int tagId, boolean ignoreReprint) throws WeixinException
articles - 图文列表tagId - 标签IDignoreReprint - 图文消息被判定为转载时,是否继续群发WeixinExceptionMpArticle,
MessageProxypublic String[] messageByOpenIds(MultiMessageTuple tuple, String... openIds) throws WeixinException
tuple - 消息元件openIds - openId列表WeixinExceptionMessageProxypublic String[] messageArticleByOpenIds(List<MpArticle> articles, boolean ignoreReprint, String... openIds) throws WeixinException
articles - 图文列表ignoreReprint - 图文消息被判定为转载时,是否继续群发openIds - openId列表WeixinExceptionMpArticle,
MessageProxypublic ApiResult deleteMessageNews(String msgid) throws WeixinException
msgid - 发送出去的消息IDWeixinExceptiondeleteMessageNews(String),
MessageProxypublic ApiResult deleteMessageNews(String msgid, int articleIndex) throws WeixinException
请注意,只有已经发送成功的消息才能删除删除消息只是将消息的图文详情页失效,已经收到的用户,还是能在其本地看到消息卡片
msgid - 发送出去的消息IDarticleIndex - 要删除的文章在图文消息中的位置,第一篇编号为1,该字段不填或填0会删除全部文章WeixinExceptionMessageProxypublic ApiResult previewMessageNews(String toUser, String toWxName, MultiMessageTuple tuple) throws WeixinException
toUser - 接收用户的openIDtoWxName - 接收用户的微信号 towxname和touser同时赋值时,以towxname优先tuple - 消息元件WeixinExceptionMessageProxy,
MultiMessageTuple,
预览群发消息public String getMessageNewStatus(String msgId) throws WeixinException
msgId - 消息IDWeixinExceptionMessageProxy,
查询群发状态public User getUser(String openId) throws WeixinException
openId - 用户对应的IDWeixinExceptionUser,
UserProxypublic User getUser(String openId, Lang lang) throws WeixinException
在关注者与公众号产生消息交互后,公众号可获得关注者的OpenID(加密后的微信号,每个用户对每个公众号的OpenID是唯一的,对于不同公众号, 同一用户的openid不同),公众号可通过本接口来根据OpenID获取用户基本信息,包括昵称、头像、性别、所在城市、语言和关注时间
openId - 用户对应的IDlang - 国家地区语言版本WeixinExceptionLang,
User,
UserProxypublic List<User> getUsers(String... openIds) throws WeixinException
openIds - 用户IDWeixinExceptionUser,
UserProxypublic List<User> getUsers(Lang lang, String... openIds) throws WeixinException
lang - 国家地区语言版本openIds - 用户IDWeixinExceptionLang,
User,
UserProxypublic Following getFollowing(String nextOpenId) throws WeixinException
public Following getFollowingOpenIds(String nextOpenId) throws WeixinException
nextOpenId - 下一次拉取数据的openid 不填写则默认从头开始拉取WeixinExceptionUserProxy,
Followingpublic List<User> getAllFollowing() throws WeixinException
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求, 将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
WeixinExceptionUserProxy,
Following,
User,
getFollowing(String)public List<String> getAllFollowingOpenIds() throws WeixinException
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求, 将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
WeixinExceptionUserProxy,
getFollowingOpenIds(String)public ApiResult remarkUserName(String openId, String remark) throws WeixinException
openId - 用户IDremark - 备注名WeixinExceptionUserProxypublic ApiResult createMenu(List<Button> buttons) throws WeixinException
buttons - 菜单列表WeixinExceptionButton,
ButtonTypepublic List<Button> getMenu() throws WeixinException
WeixinExceptionButtonpublic List<Menu> getAllMenu() throws WeixinException
WeixinExceptionButton,
Menupublic ApiResult deleteMenu() throws WeixinException
WeixinExceptionpublic String createCustomMenu(List<Button> buttons, MenuMatchRule matchRule) throws WeixinException
buttons - 菜单列表matchRule - 匹配规则 至少要有一个匹配信息是不为空WeixinExceptionButtonpublic ApiResult deleteCustomMenu(String menuId) throws WeixinException
WeixinExceptionpublic List<Button> matchCustomMenu(String userId) throws WeixinException
userId - 可以是粉丝的OpenID,也可以是粉丝的微信号。WeixinExceptionButtonpublic QrcodeResult createQrcode(QrcodeParameter parameter) throws WeixinException
parameter - 二维码参数WeixinExceptionQrcodeResult,
QrcodeParameter,
QrcodeProxy,
生成二维码public ApiResult setTmplIndustry(IndustryType... industryTypes) throws WeixinException
industryTypes - 所处行业 目前不超过两个WeixinExceptionIndustryType,
TemplateMessageProxy,
设置所处行业public String getTemplateId(String shortId) throws WeixinException
shortId - 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式WeixinExceptionTemplateMessageProxypublic List<TemplateMessageInfo> getAllTemplates() throws WeixinException
WeixinExceptionTemplateMessageInfo,
获取模板列表,
TemplateMessageProxypublic ApiResult deleteTemplate(String templateId) throws WeixinException
templateId - 公众帐号下模板消息IDWeixinExceptionTemplateMessageProxypublic String sendTmplMessage(TemplateMessage tplMessage) throws WeixinException
tplMessage - 模板消息主体WeixinExceptionTemplateMessage,
TemplateMessageProxypublic String getShorturl(String url) throws WeixinException
url - 待转换的链接WeixinExceptionToolsProxypublic SemResult semantic(SemQuery semQuery) throws WeixinException
semQuery - 语义理解协议WeixinExceptionSemQuery,
SemResult,
语义理解,
ToolsProxypublic List<String> getWechatServerIp() throws WeixinException
WeixinExceptionToolsProxypublic ApiResult clearQuota() throws WeixinException
WeixinExceptionToolsProxypublic MenuSetting getMenuSetting() throws WeixinException
WeixinExceptionButton,
MpArticle,
ToolsProxypublic AutoReplySetting getAutoReplySetting() throws WeixinException
WeixinExceptionAutoReplySetting,
ToolsProxy,
获取自动回复规则public List<?> datacube(DatacubeType datacubeType, Date beginDate, Date endDate) throws WeixinException
datacubeType - 数据统计类型beginDate - 获取数据的起始日期,begin_date和end_date的差值需小于“最大时间跨度”(比如最大时间跨度为1时,
begin_date和end_date的差值只能为0,才能小于1),否则会报错endDate - 获取数据的结束日期,end_date允许设置的最大值为昨日WeixinExceptionDataProxy,
UserSummary,
ArticleSummary,
ArticleTotal,
ArticleDatacubeShare,
UpstreamMessage,
UpstreamMessageDist,
InterfaceSummary,
用户分析,
图文分析,
消息分析,
接口分析public List<?> datacube(DatacubeType datacubeType, Date beginDate, int offset) throws WeixinException
datacubeType - 统计类型beginDate - 开始日期offset - 增量 表示向前几天 比如 offset=1 则查询 beginDate的后一天之间的数据WeixinExceptionDataProxypublic List<?> datacube(DatacubeType datacubeType, int offset, Date endDate) throws WeixinException
datacubeType - 统计类型offset - 增量 表示向后几天 比如 offset=1 则查询 beginDate的前一天之间的数据endDate - 截至日期WeixinExceptionDataProxypublic List<?> datacube(DatacubeType datacubeType, Date date) throws WeixinException
datacubeType - 统计类型date - 统计日期WeixinExceptionDataProxypublic Tag createTag(String name) throws WeixinException
name - 标签名(30个字符以内)WeixinExceptionTagProxy,
Tag,
创建标签public List<Tag> listTags() throws WeixinException
WeixinExceptionTagProxy,
Tag,
获取标签public ApiResult updateTag(Tag tag) throws WeixinException
tag - 标签对象WeixinExceptionTagProxy,
Tag,
更新标签public ApiResult deleteTag(int tagId) throws WeixinException
tagId - 标签idWeixinExceptionTagProxy,
删除标签public ApiResult taggingUsers(int tagId, String... openIds) throws WeixinException
tagId - 标签IDopenIds - 用户IDWeixinExceptionTagProxy,
批量为用户打标签public ApiResult untaggingUsers(int tagId, String... openIds) throws WeixinException
tagId - 标签IDopenIds - 用户IDWeixinExceptionTagProxy,
批量为用户取消标签public Following getTagFollowingOpenIds(int tagId, String nextOpenId) throws WeixinException
tagId - 标签IDnextOpenId - 第一个拉取的OPENID,不填默认从头开始拉取WeixinExceptionTagProxy,
获取标签下粉丝列表public Following getTagFollowing(int tagId, String nextOpenId) throws WeixinException
tagId - 标签IDnextOpenId - 第一个拉取的OPENID,不填默认从头开始拉取WeixinExceptionTagProxy,
获取标签下粉丝列表public List<String> getAllTagFollowingOpenIds(int tagId) throws WeixinException
tagId - 标签IDWeixinExceptionTagProxy,
getTagFollowingOpenIds(int,String),
获取标签下粉丝列表public List<User> getAllTagFollowing(int tagId) throws WeixinException
tagId - 标签IDWeixinExceptionTagProxy,
getTagFollowing(int,String),
获取标签下粉丝列表public Integer[] getUserTags(String openId) throws WeixinException
openId - 用户IDWeixinExceptionTagProxy,
获取用户身上的标签列表public Following getBalcklistOpenIds(String nextOpenId) throws WeixinException
nextOpenId - 下一次拉取数据的openid 不填写则默认从头开始拉取WeixinExceptionTagProxy,
Followingpublic List<String> getAllBalcklistOpenIds() throws WeixinException
当公众号关注者数量超过10000时,可通过填写next_openid的值,从而多次拉取列表的方式来满足需求, 将上一次调用得到的返回中的next_openid值,作为下一次调用中的next_openid值
WeixinExceptionTagProxy,
获取黑名单列表,
getFollowingOpenIds(String)public ApiResult batchBlacklist(boolean blacklist, String... openIds) throws WeixinException
blacklist - true=拉黑用户,false=取消拉黑用户openIds - 用户ID列表WeixinExceptionTagProxy,
黑名单操作public String createCardCoupon(CardCoupon cardCoupon) throws WeixinException
cardCoupon - 卡券对象WeixinExceptionCardCoupons,
MediaProxy.uploadImage(java.io.InputStream, String),
CardProxypublic ApiResult setCardPayCell(String cardId, boolean isOpen) throws WeixinException
cardId - 卡券IDisOpen - 是否开启买单功能,填true/falseWeixinExceptioncreateCardCoupon(CardCoupon),
CardProxypublic ApiResult setCardSelfConsumeCell(String cardId, boolean isOpen) throws WeixinException
cardId - 卡券IDisOpen - 是否开启买单功能,填true/falseWeixinExceptioncreateCardCoupon(CardCoupon),
CardProxypublic QrcodeResult createCardQR(Integer expireSeconds, CardQR... cardQRs) throws WeixinException
expireSeconds - 指定二维码的有效时间,范围是60 ~ 1800秒。不填默认为365天有效cardQRs - 二维码参数:二维码领取单张卡券/多张卡券WeixinExceptionQrcodeResult,
QrcodeParameter,
CardProxy,
投放卡券public ApiResult openComment(boolean open, String msgid, int index) throws WeixinException
open - true为打开,false为关闭msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文WeixinExceptionComponentProxypublic PageData<ArticleComment> listArticleComments(Pageable page, ArticleComment.ArticleCommentType commentType, String msgid, int index) throws WeixinException
page - 分页信息commentType - 评论类型 为空获取全部类型msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文WeixinExceptionArticleComment,
ArticleComment.ArticleCommentType,
ArticleProxypublic List<ArticleComment> listAllArticleComments(ArticleComment.ArticleCommentType commentType, String msgid, int index) throws WeixinException
commentType - 评论类型 为空获取全部类型msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文WeixinExceptionArticleProxy,
listArticleComments(Pageable, ArticleComment.ArticleCommentType, String, int)public ApiResult markelectComment(boolean markelect, String msgid, int index, String commentId) throws WeixinException
markelect - true为标记,false为取消msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId - 用户评论IDWeixinExceptionArticleProxy,
listArticleComments(Pageable, ArticleComment.ArticleCommentType, String, int)public ApiResult deleteComment(String msgid, int index, String commentId) throws WeixinException
msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId - 用户评论IDWeixinExceptionArticleProxy,
listArticleComments(Pageable, ArticleComment.ArticleCommentType, String, int)public ApiResult replyComment(String msgid, int index, String commentId, String content) throws WeixinException
msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId - 用户评论IDcontent - 回复内容WeixinExceptionArticleProxy,
listArticleComments(Pageable, ArticleComment.ArticleCommentType, String, int)public ApiResult deleteCommentReply(String msgid, int index, String commentId) throws WeixinException
msgid - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId - 用户评论IDWeixinExceptionArticleProxy,
listArticleComments(Pageable, ArticleComment.ArticleCommentType, String, int)Copyright © 2020. All rights reserved.