public class EnterpriseWeChatUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ENTERPRISE_WE_CHAT_AGENT_ID |
static String |
ENTERPRISE_WE_CHAT_USERS |
static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
EnterpriseWeChatUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getToken()
get Enterprise WeChat token info
|
static boolean |
isEnable()
get Enterprise WeChat is enable
|
static String |
makeTeamSendMsg(Collection<String> toParty,
String agentId,
String msg)
make team multi Enterprise WeChat message
|
static String |
makeTeamSendMsg(String toParty,
String agentId,
String msg)
make team single Enterprise WeChat message
|
static String |
makeUserSendMsg(Collection<String> toUser,
String agentId,
String msg)
make team multi user message
|
static String |
makeUserSendMsg(String toUser,
String agentId,
String msg)
make team single user message
|
static String |
markdownByAlert(org.apache.dolphinscheduler.plugin.model.AlertData alert)
Determine the mardown style based on the show type of the alert
|
static String |
markdownTable(String title,
String content)
convert table to markdown style
|
static String |
markdownText(String title,
String content)
convert text to markdown style
|
static String |
sendEnterpriseWeChat(String charset,
String data,
String token)
send Enterprise WeChat
|
public static final org.slf4j.Logger logger
public static final String ENTERPRISE_WE_CHAT_AGENT_ID
public static final String ENTERPRISE_WE_CHAT_USERS
public static boolean isEnable()
public static String getToken() throws IOException
IOException - the IOExceptionpublic static String makeTeamSendMsg(String toParty, String agentId, String msg)
toParty - the toPartyagentId - the agentIdmsg - the msgpublic static String makeTeamSendMsg(Collection<String> toParty, String agentId, String msg)
toParty - the toPartyagentId - the agentIdmsg - the msgpublic static String makeUserSendMsg(String toUser, String agentId, String msg)
toUser - the toUseragentId - the agentIdmsg - the msgpublic static String makeUserSendMsg(Collection<String> toUser, String agentId, String msg)
toUser - the toUseragentId - the agentIdmsg - the msgpublic static String sendEnterpriseWeChat(String charset, String data, String token) throws IOException
charset - the charsetdata - the datatoken - the tokenIOException - the IOExceptionpublic static String markdownTable(String title, String content)
title - the titlecontent - the contentpublic static String markdownText(String title, String content)
title - the titlecontent - the contentpublic static String markdownByAlert(org.apache.dolphinscheduler.plugin.model.AlertData alert)
Copyright © 2021 The Apache Software Foundation. All rights reserved.