public abstract class BaseWxCpCgServiceImpl<H,P> extends Object implements WxCpCgService, RequestHttp<H,P>
限定符和类型 | 字段和说明 |
---|---|
protected WxCpCorpGroupConfigStorage |
configStorage
The Config storage.
|
构造器和说明 |
---|
BaseWxCpCgServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
<T,E> T |
execute(RequestExecutor<T,E> executor,
String uri,
E data,
boolean withoutCorpAccessToken,
WxCpCorpGroupCorpGetTokenReq req)
Execute t.
|
<T,E> T |
execute(RequestExecutor<T,E> executor,
String uri,
E data,
WxCpCorpGroupCorpGetTokenReq req)
向微信端发送请求,在这里执行的策略是当发生access_token过期时才去刷新,然后重新执行请求,而不是全局定时请求.
|
protected <T,E> T |
executeInternal(RequestExecutor<T,E> executor,
String uri,
E data,
boolean withoutCorpAccessToken,
WxCpCorpGroupCorpGetTokenReq req)
Execute internal t.
|
protected <T,E> T |
executeInternal(RequestExecutor<T,E> executor,
String uri,
E data,
WxCpCorpGroupCorpGetTokenReq req)
Execute internal t.
|
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() |
boolean |
isCorpAccessTokenExpired(String corpId,
Integer agentId)
Is access token expired boolean.
|
String |
post(String url,
String postData,
boolean withoutCorpAccessToken,
WxCpCorpGroupCorpGetTokenReq req)
Post string.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initHttp
getRequestHttpClient, getRequestHttpProxy, getRequestType
protected WxCpCorpGroupConfigStorage configStorage
public void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds)
WxCpCgService
updateCorpAccessToken
在接口中 WxCpCgService
corpId
- .agentId
- .corpAccessToken
- the corp access tokenexpiresInSeconds
- the expires in secondspublic String getCorpAccessToken(String corpId, Integer agentId, Integer businessType) throws WxErrorException
getCorpAccessToken
在接口中 WxCpCgService
WxErrorException
public String getCorpAccessToken(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException
getCorpAccessToken
在接口中 WxCpCgService
WxErrorException
public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType) throws WxErrorException
WxCpCgService
getCorpAccessTokenEntity
在接口中 WxCpCgService
corpId
- the corp idWxErrorException
public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException
WxCpCgService
getCorpAccessTokenEntity
在接口中 WxCpCgService
corpId
- the corp idWxErrorException
public boolean isCorpAccessTokenExpired(String corpId, Integer agentId)
WxCpCgService
isCorpAccessTokenExpired
在接口中 WxCpCgService
corpId
- the corp idpublic void expireCorpAccessToken(String corpId, Integer agentId)
WxCpCgService
expireCorpAccessToken
在接口中 WxCpCgService
corpId
- the corp idpublic String get(String url, String queryParam, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
WxCpCgService
get
在接口中 WxCpCgService
url
- 接口地址queryParam
- 请求参数WxErrorException
- the wx error exceptionpublic String get(String url, String queryParam, boolean withoutCorpAccessToken, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
WxCpCgService
get
在接口中 WxCpCgService
url
- 接口地址queryParam
- 请求参数withoutCorpAccessToken
- 请求是否忽略CorpAccessToken 默认不忽略-falseWxErrorException
- the wx error exceptionpublic String post(String url, String postData, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
WxCpCgService
post
在接口中 WxCpCgService
url
- 接口地址postData
- 请求body字符串WxErrorException
- the wx error exceptionpublic String post(String url, String postData, boolean withoutCorpAccessToken, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
url
- the urlpostData
- the post datawithoutCorpAccessToken
- the without Corp access tokenWxErrorException
- the wx error exceptionpublic <T,E> T execute(RequestExecutor<T,E> executor, String uri, E data, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
execute
在接口中 WxCpCgService
T
- 请求值类型E
- 返回值类型executor
- 执行器uri
- 请求地址data
- 参数WxErrorException
- the wx error exceptionpublic <T,E> T execute(RequestExecutor<T,E> executor, String uri, E data, boolean withoutCorpAccessToken, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
T
- the type parameterE
- the type parameterexecutor
- the executoruri
- the uridata
- the datawithoutCorpAccessToken
- the without Corp access tokenWxErrorException
- the wx error exceptionprotected <T,E> T executeInternal(RequestExecutor<T,E> executor, String uri, E data, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
T
- the type parameterE
- the type parameterexecutor
- the executoruri
- the uridata
- the dataWxErrorException
- the wx error exceptionprotected <T,E> T executeInternal(RequestExecutor<T,E> executor, String uri, E data, boolean withoutCorpAccessToken, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
T
- the type parameterE
- the type parameterexecutor
- the executoruri
- the uridata
- the datawithoutCorpAccessToken
- the without Corp access tokenWxErrorException
- the wx error exceptionpublic void setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage)
setWxCpCorpGroupConfigStorage
在接口中 WxCpCgService
public WxCpCorpGroupConfigStorage getWxCpCorpGroupConfigStorage()
getWxCpCorpGroupConfigStorage
在接口中 WxCpCgService
public void setRetrySleepMillis(int retrySleepMillis)
WxCpCgService
设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试. 默认:1000ms
setRetrySleepMillis
在接口中 WxCpCgService
retrySleepMillis
- 重试休息时间public void setMaxRetryTimes(int maxRetryTimes)
WxCpCgService
设置当微信系统响应系统繁忙时,最大重试次数. 默认:5次
setMaxRetryTimes
在接口中 WxCpCgService
maxRetryTimes
- 最大重试次数public RequestHttp<?,?> getRequestHttp()
WxCpCgService
getRequestHttp
在接口中 WxCpCgService
public void setWxCpService(WxCpService wxCpService)
setWxCpService
在接口中 WxCpCgService
public WxCpLinkedCorpService getLinkedCorpService()
WxCpCgService
getLinkedCorpService
在接口中 WxCpCgService
public WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException
WxCpCgService
getCorpTransferSession
在接口中 WxCpCgService
WxErrorException
Copyright © 2024. All rights reserved.