@EnableConfigurationProperties(value=WXWorkProperties.class) @Service public class WXWorkServiceImpl extends Object implements WXWorkService, org.springframework.beans.factory.InitializingBean
| 限定符和类型 | 字段和说明 |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
OBJECT_MAPPER |
| 构造器和说明 |
|---|
WXWorkServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
Map<String,Object> |
callback(String name,
String msg_signature,
String timestamp,
String nonce,
String xml,
javax.servlet.http.HttpServletResponse response)
企业内部开发 / 服务端API / 开发指南 / 回调配置 / 支持Http Post请求接收业务数据
|
byte[] |
downloadTemp(String name,
String mediaId)
企业内部开发 / 服务端API / 素材管理 / 获取临时素材
|
byte[] |
downloadVoice(String name,
String mediaId)
企业内部开发 / 服务端API / 素材管理 / 获取高清语音素材
|
String |
get(WXWorkApiType type,
String name,
URI url) |
Map<String,Object> |
getAppConfig(String name,
String webUrl)
企业内部开发 / 客户端API / JS-SDK / 基础接口 / wx.agentConfig / 通过agentConfig注入应用的权限
|
String |
getAppTicket(String name)
企业内部开发 / 客户端API / JS-SDK / 附录 / JS-SDK使用权限签名算法 / 获取应用的jsapi_ticket
|
String |
getAppTicketCache(String name)
企业内部开发 / 客户端API / JS-SDK / 附录 / JS-SDK使用权限签名算法 / 获取应用的jsapi_ticket
|
String |
getAuth(WXWorkApiType type,
String name,
URI url) |
CheckinRecord |
getCheckinRecord(String name,
CheckinType openCheckinDataType,
long startTime,
long endTime,
List<String> userIdList)
企业内部开发 / 服务端API / OA / 打卡 / 获取打卡记录数据
|
Map<String,Object> |
getCorpConfig(String name,
String webUrl)
企业内部开发 / 客户端API / JS-SDK / 开始开发 / 使用说明 / 通过config接口注入权限验证配置
|
String |
getCorpTicket(String name)
企业内部开发 / 客户端API / JS-SDK / 附录 / JS-SDK使用权限签名算法 / 获取企业的jsapi_ticket
|
String |
getCorpTicketCache(String name)
企业内部开发 / 客户端API / JS-SDK / 附录 / JS-SDK使用权限签名算法 / 获取企业的jsapi_ticket
|
DepartmentList |
getDepartmentList(WXWorkApiType type,
String name,
int departmentId)
企业内部开发 / 服务端API / 通讯录管理 / 部门管理 / 获取部门列表
|
DepartmentUser |
getDepartmentUser(WXWorkApiType type,
String name,
int departmentId,
State fetchChild)
企业内部开发 / 服务端API / 通讯录管理 / 成员管理 / 获取部门成员
|
TagList |
getTagList(WXWorkApiType type,
String name)
企业内部开发 / 服务端API / 通讯录管理 / 标签管理 / 获取标签列表
|
TagUser |
getTagUser(WXWorkApiType type,
String name,
int tagId)
企业内部开发 / 服务端API / 通讯录管理 / 标签管理 / 获取标签成员
|
String |
getToken(WXWorkApiType type,
String name,
String corpId,
String secret)
企业内部开发 / 服务端API / 开发指南 / 获取access_token
|
String |
getTokenCache(WXWorkApiType type,
String name,
String corpId,
String secret)
企业内部开发 / 服务端API / 开发指南 / 获取access_token
|
User |
getUser(String name,
String code)
企业内部开发 / 服务端API / 身份验证 / 网页授权登录 / 获取访问用户身份
|
UserInfo |
getUserInfo(WXWorkApiType type,
String name,
String userId)
企业内部开发 / 服务端API / 通讯录管理 / 成员管理 / 读取成员
|
byte[] |
post(WXWorkApiType type,
String name,
URI url) |
String |
post(WXWorkApiType type,
String name,
URI url,
Object body) |
String |
post(WXWorkApiType type,
String name,
URI url,
String filePath) |
AppMsg |
sendAppMarkdownMsg(String name,
MarkdownAppMsg object)
企业内部开发 / 服务端API / 消息推送 / 发送应用消息 / markdown消息
|
AppMsg |
sendAppTextMsg(String name,
TextAppMsg object)
企业内部开发 / 服务端API / 消息推送 / 发送应用消息 / 文本消息
|
Result |
sendBotMarkdownMsg(String name,
MarkdownBotMsg object)
企业内部开发 / 客户端API / 群机器人 / 群机器人配置说明 / markdown类型
|
Result |
sendBotTextMsg(String name,
TextBotMsg object)
企业内部开发 / 客户端API / 群机器人 / 群机器人配置说明 / 文本类型
|
UploadImage |
uploadImage(String name,
String filePath)
企业内部开发 / 服务端API / 素材管理 / 上传图片
|
UploadTemp |
uploadTemp(String name,
UploadTempType tempType,
String filePath)
企业内部开发 / 服务端API / 素材管理 / 上传临时素材
|
void |
verifyUrl(String name,
String msg_signature,
String timestamp,
String nonce,
String echostr,
javax.servlet.http.HttpServletResponse response)
企业内部开发 / 服务端API / 开发指南 / 回调配置 / 支持Http Get请求验证URL有效性
|
public void afterPropertiesSet()
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanpublic String getToken(WXWorkApiType type, String name, String corpId, String secret)
WXWorkServicegetToken 在接口中 WXWorkServicetype - WXWorkApiTypename - 名称corpId - 客户端编号secret - 客户端密钥public String getTokenCache(WXWorkApiType type, String name, String corpId, String secret)
WXWorkServicegetTokenCache 在接口中 WXWorkServicetype - WXWorkApiTypename - 名称corpId - 客户端编号secret - 客户端密钥WXWorkService.getToken(WXWorkApiType, String, String, String)public void verifyUrl(String name, String msg_signature, String timestamp, String nonce, String echostr, javax.servlet.http.HttpServletResponse response)
WXWorkServiceverifyUrl 在接口中 WXWorkServicename - 名称msg_signature - 企业微信加密签名,msg_signature计算结合了企业填写的token、请求中的timestamp、nonce、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)echostr - 加密的字符串(需要解密得到消息内容明文,解密后有random、msg_len、msg、receiveid四个字段,其中msg即为消息内容明文)response - 响应public Map<String,Object> callback(String name, String msg_signature, String timestamp, String nonce, String xml, javax.servlet.http.HttpServletResponse response)
WXWorkServicecallback 在接口中 WXWorkServicename - 名称msg_signature - 企业微信加密签名,msg_signature结合了企业填写的token、请求中的timestamp、nonce参数、加密的消息体timestamp - 时间戳(与nonce结合使用,用于防止请求重放攻击)nonce - 随机数(与timestamp结合使用,用于防止请求重放攻击)xml - 回调数据(放在 HTTP 请求体中,使用注解 RequestBody 接收)response - 响应Mappublic UserInfo getUserInfo(WXWorkApiType type, String name, String userId)
WXWorkServicegetUserInfo 在接口中 WXWorkServicetype - WXWorkApiType,可选 WXWorkApiType.CONTACT 和 WXWorkApiType.APPname - 名称userId - 工号UserInfopublic DepartmentUser getDepartmentUser(WXWorkApiType type, String name, int departmentId, State fetchChild)
WXWorkServicegetDepartmentUser 在接口中 WXWorkServicetype - WXWorkApiType,可选 WXWorkApiType.CONTACT 和 WXWorkApiType.APPname - 名称departmentId - 部门 idfetchChild - 是否递归获取子部门下面的成员(1-递归获取,0-只获取本部门)DepartmentUserpublic DepartmentList getDepartmentList(WXWorkApiType type, String name, int departmentId)
WXWorkServicegetDepartmentList 在接口中 WXWorkServicetype - WXWorkApiType,可选 WXWorkApiType.CONTACT 和 WXWorkApiType.APPname - 名称departmentId - 部门 id,获取指定部门及其下的子部门(以及子部门的子部门等等,递归);如果不填,默认获取全量组织架构DepartmentListpublic TagUser getTagUser(WXWorkApiType type, String name, int tagId)
WXWorkServicegetTagUser 在接口中 WXWorkServicetype - WXWorkApiType,可选 WXWorkApiType.CONTACT 和 WXWorkApiType.APPname - 名称tagId - 标签 idTagUserpublic TagList getTagList(WXWorkApiType type, String name)
WXWorkServicegetTagList 在接口中 WXWorkServicetype - WXWorkApiType,可选 WXWorkApiType.CONTACT 和 WXWorkApiType.APPname - 名称TagListpublic User getUser(String name, String code)
WXWorkServicegetUser 在接口中 WXWorkServicename - 名称code - 企业微信授权码,仅可使用一次,5 分钟内有效Userpublic AppMsg sendAppTextMsg(String name, TextAppMsg object)
WXWorkServicesendAppTextMsg 在接口中 WXWorkServicename - 名称object - TextAppMsgAppMsgpublic AppMsg sendAppMarkdownMsg(String name, MarkdownAppMsg object)
WXWorkServicesendAppMarkdownMsg 在接口中 WXWorkServicename - 名称object - MarkdownAppMsgAppMsgpublic UploadTemp uploadTemp(String name, UploadTempType tempType, String filePath)
WXWorkServiceuploadTemp 在接口中 WXWorkServicename - 名称tempType - UploadTempTypefilePath - 临时素材绝对路径UploadTemppublic UploadImage uploadImage(String name, String filePath)
WXWorkServiceuploadImage 在接口中 WXWorkServicename - 名称filePath - 图片绝对路径UploadImagepublic byte[] downloadTemp(String name, String mediaId)
WXWorkServicedownloadTemp 在接口中 WXWorkServicename - 名称mediaId - 媒体文件 idpublic byte[] downloadVoice(String name, String mediaId)
WXWorkServicedownloadVoice 在接口中 WXWorkServicename - 名称mediaId - 媒体文件 idpublic CheckinRecord getCheckinRecord(String name, CheckinType openCheckinDataType, long startTime, long endTime, List<String> userIdList)
WXWorkServicegetCheckinRecord 在接口中 WXWorkServicename - 名称openCheckinDataType - 打卡类型(1-上下班打卡,2-外出打卡,3-全部打卡)startTime - 获取打卡记录的开始时间(10 位 Unix 时间戳)endTime - 获取打卡记录的结束时间(10 位 Unix 时间戳)userIdList - 工号集合(至多 100 个)CheckinRecordpublic String getCorpTicket(String name)
WXWorkServicegetCorpTicket 在接口中 WXWorkServicename - 名称public String getCorpTicketCache(String name)
WXWorkServicegetCorpTicketCache 在接口中 WXWorkServicename - 名称WXWorkService.getCorpTicket(String)public String getAppTicket(String name)
WXWorkServicegetAppTicket 在接口中 WXWorkServicename - 名称public String getAppTicketCache(String name)
WXWorkServicegetAppTicketCache 在接口中 WXWorkServicename - 名称WXWorkService.getAppTicket(String)public Map<String,Object> getCorpConfig(String name, String webUrl)
WXWorkServicegetCorpConfig 在接口中 WXWorkServicename - 名称webUrl - window.location.hrefMappublic Map<String,Object> getAppConfig(String name, String webUrl)
WXWorkServicegetAppConfig 在接口中 WXWorkServicename - 名称webUrl - window.location.hrefMappublic Result sendBotTextMsg(String name, TextBotMsg object)
WXWorkServicesendBotTextMsg 在接口中 WXWorkServicename - 名称object - TextBotMsgResultpublic Result sendBotMarkdownMsg(String name, MarkdownBotMsg object)
WXWorkServicesendBotMarkdownMsg 在接口中 WXWorkServicename - 名称object - MarkdownBotMsgResultpublic String get(WXWorkApiType type, String name, URI url)
public String getAuth(WXWorkApiType type, String name, URI url)
public String post(WXWorkApiType type, String name, URI url, Object body)
public String post(WXWorkApiType type, String name, URI url, String filePath)
public byte[] post(WXWorkApiType type, String name, URI url)
Copyright © 2023. All rights reserved.