public interface WXWorkService
| 限定符和类型 | 方法和说明 |
|---|---|
com.google.common.collect.Multimap<String,String> |
callback(Integer appIndex,
String msg_signature,
String timestamp,
String nonce,
String xml,
javax.servlet.http.HttpServletResponse response)
处理 callback
|
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 签名
|
DepartmentDataResponseDTO |
getDepartmentData(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 缓存
|
TagDataResponseDTO |
getTagData()
获取 tag 标签列表(token 必须由通讯录 secret 获取)
|
TagUserResponseDTO |
getTagUser(Integer tagId)
获取 tag 标签 user 简单信息(token 必须由通讯录 secret 获取)
|
UserIdResponseDTO |
getUserId(Integer appIndex,
String code)
获取工号
|
UserInfoResponseDTO |
getUserInfo(Integer appIndex,
String userId)
获取 user 信息
|
boolean |
isPC(String userAgent)
是否 PC
|
boolean |
sendTextMsg(Integer appIndex,
List<String> userIdList,
String content)
发送文本信息
|
boolean |
sendTextMsg(Integer appIndex,
String userId,
String content)
发送文本信息
|
boolean |
verifyUrl(Integer appIndex,
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 分钟内有效UserInfoResponseDTO getUserInfo(Integer appIndex, String userId)
appIndex - 索引userId - 工号DepartmentDataResponseDTO getDepartmentData(Integer appIndex, Integer departmentId)
appIndex - 索引departmentId - 部门 id,获取指定部门及其下的子部门(以及及子部门的子部门等等,递归),如果不填,默认获取全量组织架构DepartmentUserResponseDTO getDepartmentUser(Integer appIndex, Integer departmentId, Integer fetchChild)
appIndex - 索引departmentId - 部门 idfetchChild - 是否递归获取子部门下面的成员(1-递归获取,0-只获取本部门)boolean sendTextMsg(Integer appIndex, String userId, String content)
appIndex - 索引userId - 工号(多个工号之间用“|”隔开,不允许加空格)content - 文本内容boolean sendTextMsg(Integer appIndex, List<String> userIdList, String content)
appIndex - 索引userIdList - 工号集合content - 文本内容CheckinDataResponseDTO getCheckinData(Integer openCheckinDataType, Long startTime, Long endTime, List<String> userIdList)
openCheckinDataType - 打卡类型(1-上下班打卡,2-外出打卡,3-全部打卡)startTime - 获取打卡记录的开始时间(10 位 Unix 时间戳)endTime - 获取打卡记录的结束时间(10 位 Unix 时间戳)userIdList - 工号集合(至多 100 个)TagDataResponseDTO getTagData()
TagUserResponseDTO getTagUser(Integer tagId)
tagId - 标签 idString getJsapiTicketCache(Integer appIndex)
appIndex - 索引String getJsapiTicketAgentCache(Integer appIndex)
appIndex - 索引boolean verifyUrl(Integer appIndex, String msg_signature, String timestamp, String nonce, String echostr, javax.servlet.http.HttpServletResponse response)
appIndex - 索引msg_signature - 企业微信加密签名,msg_signature计算结合了企业填写的token、请求中的timestamp、nonce、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)echostr - 加密的字符串(需要解密得到消息内容明文,解密后有random、msg_len、msg、receiveid四个字段,其中msg即为消息内容明文)response - 响应com.google.common.collect.Multimap<String,String> callback(Integer appIndex, String msg_signature, String timestamp, String nonce, String xml, javax.servlet.http.HttpServletResponse response)
appIndex - 索引msg_signature - 企业微信加密签名,msg_signature结合了企业填写的token、请求中的timestamp、nonce参数、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)xml - 回调数据(放在 HTTP 请求体中,使用 @RequestBody 注解接收)response - 响应ConfigSignatureResponseDTO getConfigSignature(Integer appIndex, String currentPageUrl)
appIndex - 索引currentPageUrl - 当前页面 urlAgentConfigSignatureResponseDTO getAgentConfigSignature(Integer appIndex, String currentPageUrl)
appIndex - 索引currentPageUrl - 当前页面 urlCallbackIpResponseDTO getCallbackIp(Integer appIndex)
appIndex - 索引boolean isPC(String userAgent)
userAgent - 用户代理Copyright © 2020 Pivotal Software, Inc.. All rights reserved.