public interface WXWorkService
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Object> |
callback(Integer callbackIndex,
String msg_signature,
String timestamp,
String nonce,
String xml,
javax.servlet.http.HttpServletResponse response)
处理 callback
|
byte[] |
downloadTemp(Integer appIndex,
String mediaId)
获取临时素材
|
byte[] |
downloadVoice(Integer appIndex,
String mediaId)
获取高清语音素材
|
AgentConfigSignatureResponseDTO |
getAgentConfigSignature(Integer appIndex,
String currentPageUrl)
获取 agentConfig 签名
|
CallbackIpResponseDTO |
getCallbackIp(Integer appIndex)
获取企业微信服务器的 ip 段
|
CheckinDataResponseDTO |
getCheckinData(Integer openCheckinDataType,
Long startTime,
Long endTime,
List<String> userIdList)
获取打卡记录(token 必须由打卡 secret 获取)
|
ConfigSignatureResponseDTO |
getConfigSignature(Integer appIndex,
String currentPageUrl)
获取 config 签名
|
DepartmentInfoResponseDTO |
getDepartmentInfo(Integer appIndex,
Integer departmentId)
获取 department 部门列表
|
DepartmentUserResponseDTO |
getDepartmentUser(Integer appIndex,
Integer departmentId,
Integer fetchChild)
获取 department 部门 user 简单信息
|
String |
getJsapiTicketAgentCache(Integer appIndex)
获取 jsapi_ticket_agent 缓存
|
String |
getJsapiTicketCache(Integer appIndex)
获取 jsapi_ticket 缓存
|
TagInfoResponseDTO |
getTagInfo()
获取 tag 标签列表(token 必须由通讯录 secret 获取)
|
TagUserResponseDTO |
getTagUser(Integer tagId)
获取 tag 标签 user 简单信息(token 必须由通讯录 secret 获取)
|
String |
getTokenCache(Integer appIndex)
获取 token 缓存
|
UserIdResponseDTO |
getUserId(Integer appIndex,
String code)
获取工号
|
UserInfoResponseDTO |
getUserInfo(Integer appIndex,
String userId)
获取 user 信息
|
AppMsgResponseDTO |
sendAppMarkdownMsg(Integer appIndex,
AppMarkdownMsgRequestDTO object)
发送应用 markdown 消息
|
AppMsgResponseDTO |
sendAppTextMsg(Integer appIndex,
AppTextMsgRequestDTO object)
发送应用文本消息
|
BotMsgResponseDTO |
sendBotMarkdownMsg(Integer botIndex,
BotMarkdownMsgRequestDTO object)
发送机器人 markdown 消息
|
BotMsgResponseDTO |
sendBotTextMsg(Integer botIndex,
BotTextMsgRequestDTO object)
发送机器人文本消息
|
AppUploadImageResponseDTO |
uploadImage(Integer appIndex,
String filePath)
上传图片
|
AppUploadTempResponseDTO |
uploadTemp(Integer appIndex,
UploadTempType tempType,
String filePath)
上传临时素材
|
boolean |
verifyUrl(Integer callbackIndex,
String msg_signature,
String timestamp,
String nonce,
String echostr,
javax.servlet.http.HttpServletResponse response)
验证 url
|
UserIdResponseDTO getUserId(Integer appIndex, String code)
appIndex - 索引code - 企业微信返回一次性 code,5 分钟内有效UserIdResponseDTOUserInfoResponseDTO getUserInfo(Integer appIndex, String userId)
appIndex - 索引userId - 工号UserInfoResponseDTODepartmentInfoResponseDTO getDepartmentInfo(Integer appIndex, Integer departmentId)
appIndex - 索引departmentId - 部门 id,获取指定部门及其下的子部门(以及及子部门的子部门等等,递归),如果不填,默认获取全量组织架构DepartmentInfoResponseDTODepartmentUserResponseDTO getDepartmentUser(Integer appIndex, Integer departmentId, Integer fetchChild)
appIndex - 索引departmentId - 部门 idfetchChild - 是否递归获取子部门下面的成员(1-递归获取,0-只获取本部门)DepartmentUserResponseDTOTagInfoResponseDTO getTagInfo()
TagUserResponseDTO getTagUser(Integer tagId)
tagId - 标签 idTagUserResponseDTOAppMsgResponseDTO sendAppTextMsg(Integer appIndex, AppTextMsgRequestDTO object)
appIndex - 索引object - AppTextMsgRequestDTOAppMsgResponseDTOAppMsgResponseDTO sendAppMarkdownMsg(Integer appIndex, AppMarkdownMsgRequestDTO object)
appIndex - 索引object - AppMarkdownMsgRequestDTOAppMsgResponseDTOAppUploadTempResponseDTO uploadTemp(Integer appIndex, UploadTempType tempType, String filePath) throws IOException
appIndex - 索引tempType - UploadTempTypefilePath - 临时素材绝对路径AppUploadTempResponseDTOIOException - 异常AppUploadImageResponseDTO uploadImage(Integer appIndex, String filePath) throws IOException
appIndex - 索引filePath - 图片绝对路径AppUploadImageResponseDTOIOException - 异常byte[] downloadTemp(Integer appIndex, String mediaId)
appIndex - 索引mediaId - 媒体文件 idbyte[] downloadVoice(Integer appIndex, String mediaId)
appIndex - 索引mediaId - 媒体文件 idCheckinDataResponseDTO getCheckinData(Integer openCheckinDataType, Long startTime, Long endTime, List<String> userIdList)
openCheckinDataType - 打卡类型(1-上下班打卡,2-外出打卡,3-全部打卡)startTime - 获取打卡记录的开始时间(10 位 Unix 时间戳)endTime - 获取打卡记录的结束时间(10 位 Unix 时间戳)userIdList - 工号集合(至多 100 个)CheckinDataResponseDTOString getJsapiTicketCache(Integer appIndex)
appIndex - 索引String getJsapiTicketAgentCache(Integer appIndex)
appIndex - 索引boolean verifyUrl(Integer callbackIndex, String msg_signature, String timestamp, String nonce, String echostr, javax.servlet.http.HttpServletResponse response)
callbackIndex - 索引msg_signature - 企业微信加密签名,msg_signature计算结合了企业填写的token、请求中的timestamp、nonce、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)echostr - 加密的字符串(需要解密得到消息内容明文,解密后有random、msg_len、msg、receiveid四个字段,其中msg即为消息内容明文)response - 响应Map<String,Object> callback(Integer callbackIndex, String msg_signature, String timestamp, String nonce, String xml, javax.servlet.http.HttpServletResponse response)
callbackIndex - 索引msg_signature - 企业微信加密签名,msg_signature结合了企业填写的token、请求中的timestamp、nonce参数、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)xml - 回调数据(放在 HTTP 请求体中,使用 @RequestBody 注解接收)response - 响应MapConfigSignatureResponseDTO getConfigSignature(Integer appIndex, String currentPageUrl)
appIndex - 索引currentPageUrl - 当前页面 urlConfigSignatureResponseDTOAgentConfigSignatureResponseDTO getAgentConfigSignature(Integer appIndex, String currentPageUrl)
appIndex - 索引currentPageUrl - 当前页面 urlAgentConfigSignatureResponseDTOCallbackIpResponseDTO getCallbackIp(Integer appIndex)
appIndex - 索引CallbackIpResponseDTOBotMsgResponseDTO sendBotTextMsg(Integer botIndex, BotTextMsgRequestDTO object)
botIndex - 索引object - BotTextMsgRequestDTOBotMsgResponseDTOBotMsgResponseDTO sendBotMarkdownMsg(Integer botIndex, BotMarkdownMsgRequestDTO object)
botIndex - 索引object - BotMarkdownMsgRequestDTOBotMsgResponseDTOCopyright © 2021. All rights reserved.