Package com.foxinmy.weixin4j.qy.api
Class NotifyApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.qy.api.QyApi
-
- com.foxinmy.weixin4j.qy.api.NotifyApi
-
-
Field Summary
-
Fields inherited from class com.foxinmy.weixin4j.api.BaseApi
weixinExecutor
-
-
Constructor Summary
Constructors Constructor Description NotifyApi(TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdParameter[]
getKfList(KfType kfType)
获取客服列表ApiResult
sendCustomeMessage(CustomeMessage message)
发送客服消息IdParameter
sendNotifyMessage(NotifyMessage message)
发送消息提醒(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)-
Methods inherited from class com.foxinmy.weixin4j.qy.api.QyApi
weixinBundle
-
Methods inherited from class com.foxinmy.weixin4j.api.BaseApi
getRequestUri
-
-
-
-
Constructor Detail
-
NotifyApi
public NotifyApi(TokenManager tokenManager)
-
-
Method Detail
-
sendNotifyMessage
public IdParameter sendNotifyMessage(NotifyMessage message) throws WeixinException
发送消息提醒(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)1) 发送人员列表存在错误的userid:执行发送,开发者需注意返回结果说明 2)发送人员不在通讯录权限范围内:不执行发送任务,返回首个出错的userid 3)发送人员不在应用可见范围内:不执行发送任务,返回首个出错的userid
- Parameters:
message
- 消息对象- Returns:
- 如果无权限或收件人不存在,则本次发送失败;如果未关注,发送仍然执行。两种情况下均返回无效的部分(注:由于userid不区分大小写, 返回的列表都统一转为小写 { "errcode": 0, "errmsg": "ok", "invaliduser": "UserID1", "invalidparty":"PartyID1", "invalidtag":"TagID1" }
- Throws:
WeixinException
- See Also:
- 发送接口说明,
Text
,Image
,Voice
,Video
,File
,News
,MpNews
,NotifyMessage
,IdParameter
-
sendCustomeMessage
public ApiResult sendCustomeMessage(CustomeMessage message) throws WeixinException
发送客服消息- Parameters:
message
- 消息对象- Returns:
- 发送结果
- Throws:
WeixinException
- See Also:
- 客服接口说明,
Text
,Image
,Voice
,Video
,File
,CustomeMessage
-
getKfList
public IdParameter[] getKfList(KfType kfType) throws WeixinException
获取客服列表- Parameters:
kfType
- 客服类型 为空时返回全部类型的客服- Returns:
- 第一个元素为内部客服(internal),第二个元素为外部客服(external)
- Throws:
WeixinException
- See Also:
IdParameter
, 客服列表
-
-