public class WeiXinCompanySendMsg extends Object
| 构造器和说明 |
|---|
WeiXinCompanySendMsg() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
sendFileMsg(String touser,
String toparty,
String totag,
int agentid,
String media_id,
boolean safe)
发送多媒体文件
|
static String |
sendTextMsg(String user,
int agentid,
String content) |
static String |
sendTextMsg(String touser,
String toparty,
String totag,
int agentid,
String content,
boolean safe)
发送文字消息,
|
public static String sendTextMsg(String user, int agentid, String content) throws IOException
user - 成员IDagentid - 企业应用的idcontent - 消息内容IOExceptionpublic static String sendTextMsg(String touser, String toparty, String totag, int agentid, String content, boolean safe) throws IOException
touser - 成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送toparty - 部门ID列表,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数stotag - 标签ID列表,多个接收者用‘|’分隔。当touser为@all时忽略本参数agentid - 企业应用的id,整型。可在应用的设置页面查看content - 消息内容safe - 表示是否是保密消息,0表示否,1表示是,默认0IOExceptionpublic static String sendFileMsg(String touser, String toparty, String totag, int agentid, String media_id, boolean safe) throws IOException
IOExceptionCopyright © 2017. All rights reserved.