public interface WxCpCgService
限定符和类型 | 方法和说明 |
---|---|
<T,E> T |
execute(RequestExecutor<T,E> executor,
String uri,
E data,
WxCpCorpGroupCorpGetTokenReq req)
Service没有实现某个API的时候,可以用这个,
比
get(java.lang.String, java.lang.String, me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq) 和post(java.lang.String, java.lang.String, me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq) 方法更灵活,可以自己构造RequestExecutor用来处理不同的参数和不同的返回类型。 |
void |
expireCorpAccessToken(String corpId,
Integer agentId)
Expire access token.
|
String |
get(String url,
String queryParam,
boolean withoutCorpAccessToken,
WxCpCorpGroupCorpGetTokenReq req)
当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
|
String |
get(String url,
String queryParam,
WxCpCorpGroupCorpGetTokenReq req)
当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
|
String |
getCorpAccessToken(String corpId,
Integer agentId,
Integer businessType) |
String |
getCorpAccessToken(String corpId,
Integer agentId,
Integer businessType,
boolean forceRefresh) |
WxAccessToken |
getCorpAccessTokenEntity(String corpId,
Integer agentId,
Integer businessType)
授权企业的access token相关
|
WxAccessToken |
getCorpAccessTokenEntity(String corpId,
Integer agentId,
Integer businessType,
boolean forceRefresh)
Gets access token entity.
|
WxCpMaTransferSession |
getCorpTransferSession(String userId,
String sessionKey,
WxCpCorpGroupCorpGetTokenReq req)
获取下级/下游企业小程序session
https://developer.work.weixin.qq.com/document/path/93355
|
WxCpLinkedCorpService |
getLinkedCorpService()
互联企业的服务类对象
|
RequestHttp<?,?> |
getRequestHttp()
http请求对象.
|
WxCpCorpGroupConfigStorage |
getWxCpCorpGroupConfigStorage() |
void |
initHttp()
初始化http请求对象
|
boolean |
isCorpAccessTokenExpired(String corpId,
Integer agentId)
Is access token expired boolean.
|
String |
post(String url,
String postData,
WxCpCorpGroupCorpGetTokenReq req)
当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求.
|
void |
setMaxRetryTimes(int maxRetryTimes)
设置当微信系统响应系统繁忙时,最大重试次数.
|
void |
setRetrySleepMillis(int retrySleepMillis)
设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试.
|
void |
setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage) |
void |
setWxCpService(WxCpService wxCpService) |
void |
updateCorpAccessToken(String corpId,
Integer agentId,
String corpAccessToken,
int expiresInSeconds)
Update corp access token.
|
void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds)
corpId
- .agentId
- .corpAccessToken
- the corp access tokenexpiresInSeconds
- the expires in secondsString getCorpAccessToken(String corpId, Integer agentId, Integer businessType) throws WxErrorException
WxErrorException
String getCorpAccessToken(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException
WxErrorException
WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType) throws WxErrorException
corpId
- the corp idagentId
- businessType
- WxErrorException
WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException
corpId
- the corp idagentId
- businessType
- WxErrorException
boolean isCorpAccessTokenExpired(String corpId, Integer agentId)
corpId
- the corp idagentId
- void expireCorpAccessToken(String corpId, Integer agentId)
corpId
- the corp idagentId
- String get(String url, String queryParam, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
url
- 接口地址queryParam
- 请求参数WxErrorException
- the wx error exceptionString get(String url, String queryParam, boolean withoutCorpAccessToken, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
url
- 接口地址queryParam
- 请求参数withoutCorpAccessToken
- 请求是否忽略CorpAccessToken 默认不忽略-falseWxErrorException
- the wx error exceptionString post(String url, String postData, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
url
- 接口地址postData
- 请求body字符串WxErrorException
- the wx error exception<T,E> T execute(RequestExecutor<T,E> executor, String uri, E data, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
Service没有实现某个API的时候,可以用这个, 比get(java.lang.String, java.lang.String, me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq)
和post(java.lang.String, java.lang.String, me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq)
方法更灵活,可以自己构造RequestExecutor用来处理不同的参数和不同的返回类型。 可以参考,MediaUploadRequestExecutor
的实现方法
T
- 请求值类型E
- 返回值类型executor
- 执行器uri
- 请求地址data
- 参数WxErrorException
- the wx error exceptionvoid setRetrySleepMillis(int retrySleepMillis)
设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试. 默认:1000ms
retrySleepMillis
- 重试休息时间void setMaxRetryTimes(int maxRetryTimes)
设置当微信系统响应系统繁忙时,最大重试次数. 默认:5次
maxRetryTimes
- 最大重试次数void initHttp()
void setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage)
WxCpCorpGroupConfigStorage getWxCpCorpGroupConfigStorage()
RequestHttp<?,?> getRequestHttp()
void setWxCpService(WxCpService wxCpService)
WxCpLinkedCorpService getLinkedCorpService()
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
userId
- sessionKey
- WxErrorException
Copyright © 2024. All rights reserved.