mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-25 01:14:36 +08:00
🎨 规范部分代码,增加javadoc
This commit is contained in:
parent
ddbeda4584
commit
a2f5452b4a
@ -18,21 +18,51 @@ import java.util.List;
|
|||||||
* @author <a href="https://github.com/007gzs">007</a>
|
* @author <a href="https://github.com/007gzs">007</a>
|
||||||
*/
|
*/
|
||||||
public interface WxOpenComponentService {
|
public interface WxOpenComponentService {
|
||||||
|
/**
|
||||||
|
* The constant API_COMPONENT_TOKEN_URL.
|
||||||
|
*/
|
||||||
String API_COMPONENT_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_component_token";
|
String API_COMPONENT_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_component_token";
|
||||||
|
/**
|
||||||
|
* The constant API_CREATE_PREAUTHCODE_URL.
|
||||||
|
*/
|
||||||
String API_CREATE_PREAUTHCODE_URL = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode";
|
String API_CREATE_PREAUTHCODE_URL = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode";
|
||||||
|
/**
|
||||||
|
* The constant API_QUERY_AUTH_URL.
|
||||||
|
*/
|
||||||
String API_QUERY_AUTH_URL = "https://api.weixin.qq.com/cgi-bin/component/api_query_auth";
|
String API_QUERY_AUTH_URL = "https://api.weixin.qq.com/cgi-bin/component/api_query_auth";
|
||||||
|
/**
|
||||||
|
* The constant API_AUTHORIZER_TOKEN_URL.
|
||||||
|
*/
|
||||||
String API_AUTHORIZER_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token";
|
String API_AUTHORIZER_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token";
|
||||||
|
/**
|
||||||
|
* The constant API_GET_AUTHORIZER_INFO_URL.
|
||||||
|
*/
|
||||||
String API_GET_AUTHORIZER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info";
|
String API_GET_AUTHORIZER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info";
|
||||||
|
/**
|
||||||
|
* The constant API_GET_AUTHORIZER_OPTION_URL.
|
||||||
|
*/
|
||||||
String API_GET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_option";
|
String API_GET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_option";
|
||||||
|
/**
|
||||||
|
* The constant API_SET_AUTHORIZER_OPTION_URL.
|
||||||
|
*/
|
||||||
String API_SET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_set_authorizer_option";
|
String API_SET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_set_authorizer_option";
|
||||||
|
/**
|
||||||
|
* The constant API_GET_AUTHORIZER_LIST.
|
||||||
|
*/
|
||||||
String API_GET_AUTHORIZER_LIST = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list";
|
String API_GET_AUTHORIZER_LIST = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant COMPONENT_LOGIN_PAGE_URL.
|
||||||
|
*/
|
||||||
String COMPONENT_LOGIN_PAGE_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=xxx&biz_appid=xxx";
|
String COMPONENT_LOGIN_PAGE_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=xxx&biz_appid=xxx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机端打开授权链接.
|
* 手机端打开授权链接.
|
||||||
*/
|
*/
|
||||||
String COMPONENT_MOBILE_LOGIN_PAGE_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&no_scan=1&auth_type=3&component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=xxx&biz_appid=xxx#wechat_redirect";
|
String COMPONENT_MOBILE_LOGIN_PAGE_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&no_scan=1&auth_type=3&component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=xxx&biz_appid=xxx#wechat_redirect";
|
||||||
|
/**
|
||||||
|
* The constant CONNECT_OAUTH2_AUTHORIZE_URL.
|
||||||
|
*/
|
||||||
String CONNECT_OAUTH2_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s&component_appid=%s#wechat_redirect";
|
String CONNECT_OAUTH2_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s&component_appid=%s#wechat_redirect";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,29 +74,72 @@ public interface WxOpenComponentService {
|
|||||||
*/
|
*/
|
||||||
String OAUTH2_REFRESH_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/component/refresh_token?appid=%s&grant_type=refresh_token&refresh_token=%s&component_appid=%s";
|
String OAUTH2_REFRESH_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/component/refresh_token?appid=%s&grant_type=refresh_token&refresh_token=%s&component_appid=%s";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant MINIAPP_JSCODE_2_SESSION.
|
||||||
|
*/
|
||||||
String MINIAPP_JSCODE_2_SESSION = "https://api.weixin.qq.com/sns/component/jscode2session?appid=%s&js_code=%s&grant_type=authorization_code&component_appid=%s";
|
String MINIAPP_JSCODE_2_SESSION = "https://api.weixin.qq.com/sns/component/jscode2session?appid=%s&js_code=%s&grant_type=authorization_code&component_appid=%s";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant CREATE_OPEN_URL.
|
||||||
|
*/
|
||||||
String CREATE_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/create";
|
String CREATE_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/create";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant BIND_OPEN_URL.
|
||||||
|
*/
|
||||||
String BIND_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/bind";
|
String BIND_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/bind";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant UNBIND_OPEN_URL.
|
||||||
|
*/
|
||||||
String UNBIND_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/unbind";
|
String UNBIND_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/unbind";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constant GET_OPEN_URL.
|
||||||
|
*/
|
||||||
String GET_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/get";
|
String GET_OPEN_URL = "https://api.weixin.qq.com/cgi-bin/open/get";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 快速创建小程序接口.
|
* 快速创建小程序接口.
|
||||||
*/
|
*/
|
||||||
String FAST_REGISTER_WEAPP_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create";
|
String FAST_REGISTER_WEAPP_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create";
|
||||||
|
/**
|
||||||
|
* The constant FAST_REGISTER_WEAPP_SEARCH_URL.
|
||||||
|
*/
|
||||||
String FAST_REGISTER_WEAPP_SEARCH_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=search";
|
String FAST_REGISTER_WEAPP_SEARCH_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=search";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代小程序实现业务.
|
||||||
|
* 小程序代码模版库管理:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1506504150_nMMh6&token=&lang=zh_CN
|
||||||
|
* access_token 为 component_access_token
|
||||||
|
*/
|
||||||
|
String GET_TEMPLATE_DRAFT_LIST_URL = "https://api.weixin.qq.com/wxa/gettemplatedraftlist";
|
||||||
|
/**
|
||||||
|
* The constant GET_TEMPLATE_LIST_URL.
|
||||||
|
*/
|
||||||
|
String GET_TEMPLATE_LIST_URL = "https://api.weixin.qq.com/wxa/gettemplatelist";
|
||||||
|
/**
|
||||||
|
* The constant ADD_TO_TEMPLATE_URL.
|
||||||
|
*/
|
||||||
|
String ADD_TO_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/addtotemplate";
|
||||||
|
/**
|
||||||
|
* The constant DELETE_TEMPLATE_URL.
|
||||||
|
*/
|
||||||
|
String DELETE_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/deletetemplate";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets wx mp service by appid.
|
||||||
|
*
|
||||||
|
* @param appid the appid
|
||||||
|
* @return the wx mp service by appid
|
||||||
|
*/
|
||||||
WxMpService getWxMpServiceByAppid(String appid);
|
WxMpService getWxMpServiceByAppid(String appid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定appid的开放平台小程序服务(继承一般小程序服务能力).
|
* 获取指定appid的开放平台小程序服务(继承一般小程序服务能力).
|
||||||
*
|
*
|
||||||
* @param appid .
|
* @param appid .
|
||||||
* @return .
|
* @return . wx ma service by appid
|
||||||
*/
|
*/
|
||||||
WxOpenMaService getWxMaServiceByAppid(String appid);
|
WxOpenMaService getWxMaServiceByAppid(String appid);
|
||||||
|
|
||||||
@ -74,35 +147,93 @@ public interface WxOpenComponentService {
|
|||||||
* 获取指定appid的快速创建的小程序服务.
|
* 获取指定appid的快速创建的小程序服务.
|
||||||
*
|
*
|
||||||
* @param appid .
|
* @param appid .
|
||||||
* @return .
|
* @return . wx fast ma service by appid
|
||||||
*/
|
*/
|
||||||
WxOpenFastMaService getWxFastMaServiceByAppid(String appid);
|
WxOpenFastMaService getWxFastMaServiceByAppid(String appid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets wx open config storage.
|
||||||
|
*
|
||||||
|
* @return the wx open config storage
|
||||||
|
*/
|
||||||
WxOpenConfigStorage getWxOpenConfigStorage();
|
WxOpenConfigStorage getWxOpenConfigStorage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check signature boolean.
|
||||||
|
*
|
||||||
|
* @param timestamp the timestamp
|
||||||
|
* @param nonce the nonce
|
||||||
|
* @param signature the signature
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean checkSignature(String timestamp, String nonce, String signature);
|
boolean checkSignature(String timestamp, String nonce, String signature);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component access token.
|
||||||
|
*
|
||||||
|
* @param forceRefresh the force refresh
|
||||||
|
* @return the component access token
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String getComponentAccessToken(boolean forceRefresh) throws WxErrorException;
|
String getComponentAccessToken(boolean forceRefresh) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post string.
|
||||||
|
*
|
||||||
|
* @param uri the uri
|
||||||
|
* @param postData the post data
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String post(String uri, String postData) throws WxErrorException;
|
String post(String uri, String postData) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post string.
|
||||||
|
*
|
||||||
|
* @param uri the uri
|
||||||
|
* @param postData the post data
|
||||||
|
* @param accessTokenKey the access token key
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String post(String uri, String postData, String accessTokenKey) throws WxErrorException;
|
String post(String uri, String postData, String accessTokenKey) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get string.
|
||||||
|
*
|
||||||
|
* @param uri the uri
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String get(String uri) throws WxErrorException;
|
String get(String uri) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get string.
|
||||||
|
*
|
||||||
|
* @param uri the uri
|
||||||
|
* @param accessTokenKey the access token key
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String get(String uri, String accessTokenKey) throws WxErrorException;
|
String get(String uri, String accessTokenKey) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户授权页URL(来路URL和成功跳转URL 的域名都需要为三方平台设置的 登录授权的发起页域名).
|
* 获取用户授权页URL(来路URL和成功跳转URL 的域名都需要为三方平台设置的 登录授权的发起页域名).
|
||||||
|
*
|
||||||
|
* @param redirectUri the redirect uri
|
||||||
|
* @return the pre auth url
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
String getPreAuthUrl(String redirectUri) throws WxErrorException;
|
String getPreAuthUrl(String redirectUri) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* .
|
* .
|
||||||
*
|
*
|
||||||
* @param authType 要授权的帐号类型:1则商户点击链接后,手机端仅展示公众号、2表示仅展示小程序,3表示公众号和小程序都展示。如果为未指定,则默认小程序和公众号都展示。第三方平台开发者可以使用本字段来控制授权的帐号类型。
|
* @param redirectUri the redirect uri
|
||||||
* @param bizAppid 指定授权唯一的小程序或公众号
|
* @param authType 要授权的帐号类型:1则商户点击链接后,手机端仅展示公众号、2表示仅展示小程序,3表示公众号和小程序都展示。如果为未指定,则默认小程序和公众号都展示。第三方平台开发者可以使用本字段来控制授权的帐号类型。
|
||||||
* 注:authType、bizAppid 互斥。
|
* @param bizAppid 指定授权唯一的小程序或公众号 注:authType、bizAppid 互斥。
|
||||||
|
* @return the pre auth url
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
String getPreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException;
|
String getPreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException;
|
||||||
|
|
||||||
@ -110,7 +241,7 @@ public interface WxOpenComponentService {
|
|||||||
* 获取预授权链接(手机端预授权).
|
* 获取预授权链接(手机端预授权).
|
||||||
*
|
*
|
||||||
* @param redirectUri .
|
* @param redirectUri .
|
||||||
* @return .
|
* @return . mobile pre auth url
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
*/
|
*/
|
||||||
String getMobilePreAuthUrl(String redirectUri) throws WxErrorException;
|
String getMobilePreAuthUrl(String redirectUri) throws WxErrorException;
|
||||||
@ -121,64 +252,134 @@ public interface WxOpenComponentService {
|
|||||||
* @param redirectUri .
|
* @param redirectUri .
|
||||||
* @param authType .
|
* @param authType .
|
||||||
* @param bizAppid .
|
* @param bizAppid .
|
||||||
* @return .
|
* @return . mobile pre auth url
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
*/
|
*/
|
||||||
String getMobilePreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException;
|
String getMobilePreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Route string.
|
||||||
|
*
|
||||||
|
* @param wxMessage the wx message
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String route(WxOpenXmlMessage wxMessage) throws WxErrorException;
|
String route(WxOpenXmlMessage wxMessage) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用授权码换取公众号或小程序的接口调用凭据和授权信息.
|
* 使用授权码换取公众号或小程序的接口调用凭据和授权信息.
|
||||||
|
*
|
||||||
|
* @param authorizationCode the authorization code
|
||||||
|
* @return the query auth
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
WxOpenQueryAuthResult getQueryAuth(String authorizationCode) throws WxErrorException;
|
WxOpenQueryAuthResult getQueryAuth(String authorizationCode) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取授权方的帐号基本信息.
|
* 获取授权方的帐号基本信息.
|
||||||
|
*
|
||||||
|
* @param authorizerAppid the authorizer appid
|
||||||
|
* @return the authorizer info
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
WxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) throws WxErrorException;
|
WxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取授权方的选项设置信息.
|
* 获取授权方的选项设置信息.
|
||||||
|
*
|
||||||
|
* @param authorizerAppid the authorizer appid
|
||||||
|
* @param optionName the option name
|
||||||
|
* @return the authorizer option
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
WxOpenAuthorizerOptionResult getAuthorizerOption(String authorizerAppid, String optionName) throws WxErrorException;
|
WxOpenAuthorizerOptionResult getAuthorizerOption(String authorizerAppid, String optionName) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有授权方列表.
|
* 获取所有授权方列表.
|
||||||
|
*
|
||||||
|
* @param begin the begin
|
||||||
|
* @param len the len
|
||||||
|
* @return the authorizer list
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws WxErrorException;
|
WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置授权方的选项信息.
|
* 设置授权方的选项信息.
|
||||||
|
*
|
||||||
|
* @param authorizerAppid the authorizer appid
|
||||||
|
* @param optionName the option name
|
||||||
|
* @param optionValue the option value
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
void setAuthorizerOption(String authorizerAppid, String optionName, String optionValue) throws WxErrorException;
|
void setAuthorizerOption(String authorizerAppid, String optionName, String optionValue) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets authorizer access token.
|
||||||
|
*
|
||||||
|
* @param appid the appid
|
||||||
|
* @param forceRefresh the force refresh
|
||||||
|
* @return the authorizer access token
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
String getAuthorizerAccessToken(String appid, boolean forceRefresh) throws WxErrorException;
|
String getAuthorizerAccessToken(String appid, boolean forceRefresh) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oauth 2 get access token wx mp o auth 2 access token.
|
||||||
|
*
|
||||||
|
* @param appid the appid
|
||||||
|
* @param code the code
|
||||||
|
* @return the wx mp o auth 2 access token
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
WxMpOAuth2AccessToken oauth2getAccessToken(String appid, String code) throws WxErrorException;
|
WxMpOAuth2AccessToken oauth2getAccessToken(String appid, String code) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check signature boolean.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @param timestamp the timestamp
|
||||||
|
* @param nonce the nonce
|
||||||
|
* @param signature the signature
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean checkSignature(String appId, String timestamp, String nonce, String signature);
|
boolean checkSignature(String appId, String timestamp, String nonce, String signature);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oauth 2 refresh access token wx mp o auth 2 access token.
|
||||||
|
*
|
||||||
|
* @param appid the appid
|
||||||
|
* @param refreshToken the refresh token
|
||||||
|
* @return the wx mp o auth 2 access token
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
WxMpOAuth2AccessToken oauth2refreshAccessToken(String appid, String refreshToken) throws WxErrorException;
|
WxMpOAuth2AccessToken oauth2refreshAccessToken(String appid, String refreshToken) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oauth 2 build authorization url string.
|
||||||
|
*
|
||||||
|
* @param appid the appid
|
||||||
|
* @param redirectUri the redirect uri
|
||||||
|
* @param scope the scope
|
||||||
|
* @param state the state
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
String oauth2buildAuthorizationUrl(String appid, String redirectUri, String scope, String state);
|
String oauth2buildAuthorizationUrl(String appid, String redirectUri, String scope, String state);
|
||||||
|
|
||||||
WxMaJscode2SessionResult miniappJscode2Session(String appId, String jsCode) throws WxErrorException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代小程序实现业务.
|
* Miniapp jscode 2 session wx ma jscode 2 session result.
|
||||||
* 小程序代码模版库管理:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1506504150_nMMh6&token=&lang=zh_CN
|
*
|
||||||
* access_token 为 component_access_token
|
* @param appId the app id
|
||||||
|
* @param jsCode the js code
|
||||||
|
* @return the wx ma jscode 2 session result
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
String GET_TEMPLATE_DRAFT_LIST_URL = "https://api.weixin.qq.com/wxa/gettemplatedraftlist";
|
WxMaJscode2SessionResult miniappJscode2Session(String appId, String jsCode) throws WxErrorException;
|
||||||
String GET_TEMPLATE_LIST_URL = "https://api.weixin.qq.com/wxa/gettemplatelist";
|
|
||||||
String ADD_TO_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/addtotemplate";
|
|
||||||
String DELETE_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/deletetemplate";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取草稿箱内的所有临时代码草稿.
|
* 获取草稿箱内的所有临时代码草稿.
|
||||||
*
|
*
|
||||||
* @return 草稿箱代码模板列表(draftId)
|
* @return 草稿箱代码模板列表 (draftId)
|
||||||
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
||||||
*/
|
*/
|
||||||
List<WxOpenMaCodeTemplate> getTemplateDraftList() throws WxErrorException;
|
List<WxOpenMaCodeTemplate> getTemplateDraftList() throws WxErrorException;
|
||||||
@ -186,7 +387,7 @@ public interface WxOpenComponentService {
|
|||||||
/**
|
/**
|
||||||
* 获取代码模版库中的所有小程序代码模版.
|
* 获取代码模版库中的所有小程序代码模版.
|
||||||
*
|
*
|
||||||
* @return 小程序代码模版列表(templateId)
|
* @return 小程序代码模版列表 (templateId)
|
||||||
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
||||||
*/
|
*/
|
||||||
List<WxOpenMaCodeTemplate> getTemplateList() throws WxErrorException;
|
List<WxOpenMaCodeTemplate> getTemplateList() throws WxErrorException;
|
||||||
@ -196,7 +397,7 @@ public interface WxOpenComponentService {
|
|||||||
*
|
*
|
||||||
* @param draftId 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得
|
* @param draftId 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得
|
||||||
* @throws WxErrorException 操作失败时抛出,具体错误码请看此接口的注释文档
|
* @throws WxErrorException 操作失败时抛出,具体错误码请看此接口的注释文档
|
||||||
* @see #getTemplateDraftList
|
* @see #getTemplateDraftList #getTemplateDraftList
|
||||||
*/
|
*/
|
||||||
void addToTemplate(long draftId) throws WxErrorException;
|
void addToTemplate(long draftId) throws WxErrorException;
|
||||||
|
|
||||||
@ -205,7 +406,7 @@ public interface WxOpenComponentService {
|
|||||||
*
|
*
|
||||||
* @param templateId 要删除的模版ID
|
* @param templateId 要删除的模版ID
|
||||||
* @throws WxErrorException 操作失败时抛出,具体错误码请看此接口的注释文档
|
* @throws WxErrorException 操作失败时抛出,具体错误码请看此接口的注释文档
|
||||||
* @see #getTemplateList
|
* @see #getTemplateList #getTemplateList
|
||||||
*/
|
*/
|
||||||
void deleteTemplate(long templateId) throws WxErrorException;
|
void deleteTemplate(long templateId) throws WxErrorException;
|
||||||
|
|
||||||
@ -215,38 +416,40 @@ public interface WxOpenComponentService {
|
|||||||
* https://api.weixin.qq.com/cgi-bin/open/create
|
* https://api.weixin.qq.com/cgi-bin/open/create
|
||||||
*
|
*
|
||||||
* @param appId 公众号/小程序的appId
|
* @param appId 公众号/小程序的appId
|
||||||
* @return .
|
* @return . wx open create result
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
*/
|
*/
|
||||||
WxOpenCreateResult createOpenAccount(String appId) throws WxErrorException;
|
WxOpenCreateResult createOpenAccount(String appId) throws WxErrorException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/bind.html
|
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/bind.html
|
||||||
* 将公众号/小程序绑定到开放平台帐号下
|
* 将公众号/小程序绑定到开放平台帐号下
|
||||||
*
|
*
|
||||||
* @param appId 公众号/小程序的appId
|
* @param appId 公众号/小程序的appId
|
||||||
* @param openAppid 开放平台帐号 appid,由创建开发平台帐号接口返回
|
* @param openAppid 开放平台帐号 appid,由创建开发平台帐号接口返回
|
||||||
|
* @return the boolean
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
Boolean bindOpenAccount(String appId, String openAppid) throws WxErrorException;
|
Boolean bindOpenAccount(String appId, String openAppid) throws WxErrorException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/unbind.html
|
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/unbind.html
|
||||||
* 将公众号/小程序从开放平台帐号下解绑
|
* 将公众号/小程序从开放平台帐号下解绑
|
||||||
*
|
*
|
||||||
* @param appId 公众号/小程序的appId
|
* @param appId 公众号/小程序的appId
|
||||||
* @param openAppid 开放平台帐号 appid,由创建开发平台帐号接口返回
|
* @param openAppid 开放平台帐号 appid,由创建开发平台帐号接口返回
|
||||||
|
* @return the boolean
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
Boolean unbindOpenAccount(String appId, String openAppid) throws WxErrorException;
|
Boolean unbindOpenAccount(String appId, String openAppid) throws WxErrorException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/get.html
|
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/get.html
|
||||||
* 获取公众号/小程序所绑定的开放平台帐号
|
* 获取公众号/小程序所绑定的开放平台帐号
|
||||||
*
|
*
|
||||||
* @param appId 公众号/小程序的appId
|
* @param appId 公众号/小程序的appId
|
||||||
* @return 开放平台帐号 appid,由创建开发平台帐号接口返回
|
* @return 开放平台帐号 appid,由创建开发平台帐号接口返回
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
WxOpenGetResult getOpenAccount(String appId) throws WxErrorException;
|
WxOpenGetResult getOpenAccount(String appId) throws WxErrorException;
|
||||||
|
|
||||||
@ -261,7 +464,7 @@ public interface WxOpenComponentService {
|
|||||||
* @param legalPersonaWechat 法人微信号
|
* @param legalPersonaWechat 法人微信号
|
||||||
* @param legalPersonaName 法人姓名(绑定银行卡)
|
* @param legalPersonaName 法人姓名(绑定银行卡)
|
||||||
* @param componentPhone 第三方联系电话(方便法人与第三方联系)
|
* @param componentPhone 第三方联系电话(方便法人与第三方联系)
|
||||||
* @return .
|
* @return . wx open result
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
*/
|
*/
|
||||||
WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException;
|
WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException;
|
||||||
@ -276,6 +479,7 @@ public interface WxOpenComponentService {
|
|||||||
* @param name 企业名(需与工商部门登记信息一致)
|
* @param name 企业名(需与工商部门登记信息一致)
|
||||||
* @param legalPersonaWechat 法人微信号
|
* @param legalPersonaWechat 法人微信号
|
||||||
* @param legalPersonaName 法人姓名(绑定银行卡)
|
* @param legalPersonaName 法人姓名(绑定银行卡)
|
||||||
|
* @return the wx open result
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
*/
|
*/
|
||||||
WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException;
|
WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException;
|
||||||
|
@ -9,54 +9,172 @@ import me.chanjar.weixin.open.bean.WxOpenComponentAccessToken;
|
|||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* The interface Wx open config storage.
|
||||||
|
*
|
||||||
* @author <a href="https://github.com/007gzs">007</a>
|
* @author <a href="https://github.com/007gzs">007</a>
|
||||||
*/
|
*/
|
||||||
public interface WxOpenConfigStorage {
|
public interface WxOpenConfigStorage {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component app id.
|
||||||
|
*
|
||||||
|
* @return the component app id
|
||||||
|
*/
|
||||||
String getComponentAppId();
|
String getComponentAppId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets component app id.
|
||||||
|
*
|
||||||
|
* @param componentAppId the component app id
|
||||||
|
*/
|
||||||
void setComponentAppId(String componentAppId);
|
void setComponentAppId(String componentAppId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component app secret.
|
||||||
|
*
|
||||||
|
* @return the component app secret
|
||||||
|
*/
|
||||||
String getComponentAppSecret();
|
String getComponentAppSecret();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets component app secret.
|
||||||
|
*
|
||||||
|
* @param componentAppSecret the component app secret
|
||||||
|
*/
|
||||||
void setComponentAppSecret(String componentAppSecret);
|
void setComponentAppSecret(String componentAppSecret);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component token.
|
||||||
|
*
|
||||||
|
* @return the component token
|
||||||
|
*/
|
||||||
String getComponentToken();
|
String getComponentToken();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets component token.
|
||||||
|
*
|
||||||
|
* @param componentToken the component token
|
||||||
|
*/
|
||||||
void setComponentToken(String componentToken);
|
void setComponentToken(String componentToken);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component aes key.
|
||||||
|
*
|
||||||
|
* @return the component aes key
|
||||||
|
*/
|
||||||
String getComponentAesKey();
|
String getComponentAesKey();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets component aes key.
|
||||||
|
*
|
||||||
|
* @param componentAesKey the component aes key
|
||||||
|
*/
|
||||||
void setComponentAesKey(String componentAesKey);
|
void setComponentAesKey(String componentAesKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component verify ticket.
|
||||||
|
*
|
||||||
|
* @return the component verify ticket
|
||||||
|
*/
|
||||||
String getComponentVerifyTicket();
|
String getComponentVerifyTicket();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets component verify ticket.
|
||||||
|
*
|
||||||
|
* @param componentVerifyTicket the component verify ticket
|
||||||
|
*/
|
||||||
void setComponentVerifyTicket(String componentVerifyTicket);
|
void setComponentVerifyTicket(String componentVerifyTicket);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component access token.
|
||||||
|
*
|
||||||
|
* @return the component access token
|
||||||
|
*/
|
||||||
String getComponentAccessToken();
|
String getComponentAccessToken();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is component access token expired boolean.
|
||||||
|
*
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean isComponentAccessTokenExpired();
|
boolean isComponentAccessTokenExpired();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expire component access token.
|
||||||
|
*/
|
||||||
void expireComponentAccessToken();
|
void expireComponentAccessToken();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update component access token.
|
||||||
|
*
|
||||||
|
* @param componentAccessToken the component access token
|
||||||
|
*/
|
||||||
void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken);
|
void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets http proxy host.
|
||||||
|
*
|
||||||
|
* @return the http proxy host
|
||||||
|
*/
|
||||||
String getHttpProxyHost();
|
String getHttpProxyHost();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets http proxy port.
|
||||||
|
*
|
||||||
|
* @return the http proxy port
|
||||||
|
*/
|
||||||
int getHttpProxyPort();
|
int getHttpProxyPort();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets http proxy username.
|
||||||
|
*
|
||||||
|
* @return the http proxy username
|
||||||
|
*/
|
||||||
String getHttpProxyUsername();
|
String getHttpProxyUsername();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets http proxy password.
|
||||||
|
*
|
||||||
|
* @return the http proxy password
|
||||||
|
*/
|
||||||
String getHttpProxyPassword();
|
String getHttpProxyPassword();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets apache http client builder.
|
||||||
|
*
|
||||||
|
* @return the apache http client builder
|
||||||
|
*/
|
||||||
ApacheHttpClientBuilder getApacheHttpClientBuilder();
|
ApacheHttpClientBuilder getApacheHttpClientBuilder();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets wx mp config storage.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the wx mp config storage
|
||||||
|
*/
|
||||||
WxMpConfigStorage getWxMpConfigStorage(String appId);
|
WxMpConfigStorage getWxMpConfigStorage(String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets wx ma config.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the wx ma config
|
||||||
|
*/
|
||||||
WxMaConfig getWxMaConfig(String appId);
|
WxMaConfig getWxMaConfig(String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets component access token lock.
|
||||||
|
*
|
||||||
|
* @return the component access token lock
|
||||||
|
*/
|
||||||
Lock getComponentAccessTokenLock();
|
Lock getComponentAccessTokenLock();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets lock by key.
|
||||||
|
*
|
||||||
|
* @param key the key
|
||||||
|
* @return the lock by key
|
||||||
|
*/
|
||||||
Lock getLockByKey(String key);
|
Lock getLockByKey(String key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,25 +187,54 @@ public interface WxOpenConfigStorage {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否自动刷新token
|
* 是否自动刷新token
|
||||||
|
*
|
||||||
|
* @return the boolean
|
||||||
*/
|
*/
|
||||||
boolean autoRefreshToken();
|
boolean autoRefreshToken();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets authorizer refresh token.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the authorizer refresh token
|
||||||
|
*/
|
||||||
String getAuthorizerRefreshToken(String appId);
|
String getAuthorizerRefreshToken(String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets authorizer refresh token.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @param authorizerRefreshToken the authorizer refresh token
|
||||||
|
*/
|
||||||
void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken);
|
void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets authorizer access token.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the authorizer access token
|
||||||
|
*/
|
||||||
String getAuthorizerAccessToken(String appId);
|
String getAuthorizerAccessToken(String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is authorizer access token expired boolean.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean isAuthorizerAccessTokenExpired(String appId);
|
boolean isAuthorizerAccessTokenExpired(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制将access token过期掉
|
* 强制将access token过期掉
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
*/
|
*/
|
||||||
void expireAuthorizerAccessToken(String appId);
|
void expireAuthorizerAccessToken(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应该是线程安全的
|
* 应该是线程安全的
|
||||||
*
|
*
|
||||||
|
* @param appId the app id
|
||||||
* @param authorizerAccessToken 要更新的WxAccessToken对象
|
* @param authorizerAccessToken 要更新的WxAccessToken对象
|
||||||
*/
|
*/
|
||||||
void updateAuthorizerAccessToken(String appId, WxOpenAuthorizerAccessToken authorizerAccessToken);
|
void updateAuthorizerAccessToken(String appId, WxOpenAuthorizerAccessToken authorizerAccessToken);
|
||||||
@ -95,41 +242,72 @@ public interface WxOpenConfigStorage {
|
|||||||
/**
|
/**
|
||||||
* 应该是线程安全的
|
* 应该是线程安全的
|
||||||
*
|
*
|
||||||
|
* @param appId the app id
|
||||||
* @param authorizerAccessToken 新的accessToken值
|
* @param authorizerAccessToken 新的accessToken值
|
||||||
* @param expiresInSeconds 过期时间,以秒为单位
|
* @param expiresInSeconds 过期时间,以秒为单位
|
||||||
*/
|
*/
|
||||||
void updateAuthorizerAccessToken(String appId, String authorizerAccessToken, int expiresInSeconds);
|
void updateAuthorizerAccessToken(String appId, String authorizerAccessToken, int expiresInSeconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets jsapi ticket.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the jsapi ticket
|
||||||
|
*/
|
||||||
String getJsapiTicket(String appId);
|
String getJsapiTicket(String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is jsapi ticket expired boolean.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean isJsapiTicketExpired(String appId);
|
boolean isJsapiTicketExpired(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制将jsapi ticket过期掉
|
* 强制将jsapi ticket过期掉
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
*/
|
*/
|
||||||
void expireJsapiTicket(String appId);
|
void expireJsapiTicket(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应该是线程安全的
|
* 应该是线程安全的
|
||||||
*
|
*
|
||||||
|
* @param appId the app id
|
||||||
* @param jsapiTicket 新的jsapi ticket值
|
* @param jsapiTicket 新的jsapi ticket值
|
||||||
* @param expiresInSeconds 过期时间,以秒为单位
|
* @param expiresInSeconds 过期时间,以秒为单位
|
||||||
*/
|
*/
|
||||||
void updateJsapiTicket(String appId, String jsapiTicket, int expiresInSeconds);
|
void updateJsapiTicket(String appId, String jsapiTicket, int expiresInSeconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets card api ticket.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the card api ticket
|
||||||
|
*/
|
||||||
String getCardApiTicket(String appId);
|
String getCardApiTicket(String appId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is card api ticket expired boolean.
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
|
* @return the boolean
|
||||||
|
*/
|
||||||
boolean isCardApiTicketExpired(String appId);
|
boolean isCardApiTicketExpired(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制将卡券api ticket过期掉
|
* 强制将卡券api ticket过期掉
|
||||||
|
*
|
||||||
|
* @param appId the app id
|
||||||
*/
|
*/
|
||||||
void expireCardApiTicket(String appId);
|
void expireCardApiTicket(String appId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应该是线程安全的
|
* 应该是线程安全的
|
||||||
*
|
*
|
||||||
|
* @param appId the app id
|
||||||
* @param cardApiTicket 新的cardApi ticket值
|
* @param cardApiTicket 新的cardApi ticket值
|
||||||
* @param expiresInSeconds 过期时间,以秒为单位
|
* @param expiresInSeconds 过期时间,以秒为单位
|
||||||
*/
|
*/
|
||||||
@ -137,10 +315,11 @@ public interface WxOpenConfigStorage {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置第三方平台基础信息
|
* 设置第三方平台基础信息
|
||||||
* @param componentAppId 第三方平台 appid
|
*
|
||||||
|
* @param componentAppId 第三方平台 appid
|
||||||
* @param componentAppSecret 第三方平台 appsecret
|
* @param componentAppSecret 第三方平台 appsecret
|
||||||
* @param componentToken 消息校验Token
|
* @param componentToken 消息校验Token
|
||||||
* @param componentAesKey 消息加解密Key
|
* @param componentAesKey 消息加解密Key
|
||||||
*/
|
*/
|
||||||
void setWxOpenInfo(String componentAppId, String componentAppSecret, String componentToken, String componentAesKey);
|
void setWxOpenInfo(String componentAppId, String componentAppSecret, String componentToken, String componentAesKey);
|
||||||
}
|
}
|
||||||
|
@ -3,22 +3,49 @@ package me.chanjar.weixin.open.api;
|
|||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* The interface Wx open service.
|
||||||
|
*
|
||||||
* @author <a href="https://github.com/007gzs">007</a>
|
* @author <a href="https://github.com/007gzs">007</a>
|
||||||
*/
|
*/
|
||||||
public interface WxOpenService {
|
public interface WxOpenService {
|
||||||
|
/**
|
||||||
|
* Gets wx open component service.
|
||||||
|
*
|
||||||
|
* @return the wx open component service
|
||||||
|
*/
|
||||||
WxOpenComponentService getWxOpenComponentService();
|
WxOpenComponentService getWxOpenComponentService();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets wx open config storage.
|
||||||
|
*
|
||||||
|
* @return the wx open config storage
|
||||||
|
*/
|
||||||
WxOpenConfigStorage getWxOpenConfigStorage();
|
WxOpenConfigStorage getWxOpenConfigStorage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets wx open config storage.
|
||||||
|
*
|
||||||
|
* @param wxOpenConfigStorage the wx open config storage
|
||||||
|
*/
|
||||||
void setWxOpenConfigStorage(WxOpenConfigStorage wxOpenConfigStorage);
|
void setWxOpenConfigStorage(WxOpenConfigStorage wxOpenConfigStorage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求
|
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求
|
||||||
|
*
|
||||||
|
* @param url the url
|
||||||
|
* @param queryParam the query param
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
String get(String url, String queryParam) throws WxErrorException;
|
String get(String url, String queryParam) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求
|
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求
|
||||||
|
*
|
||||||
|
* @param url the url
|
||||||
|
* @param postData the post data
|
||||||
|
* @return the string
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
*/
|
*/
|
||||||
String post(String url, String postData) throws WxErrorException;
|
String post(String url, String postData) throws WxErrorException;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user