public class OpenApiDecodeService extends Object
| 限定符和类型 | 类和说明 |
|---|---|
class |
OpenApiDecodeService.WxAppLoginForm
示例参数
|
static class |
OpenApiDecodeService.WxAppLoginResponse
示例接口返回包装类
|
class |
OpenApiDecodeService.WxPubBuildAuthorizationUrlForm |
class |
OpenApiDecodeService.WxPubExchangeAuthCodeToUserForm |
class |
OpenApiDecodeService.WxPubGetJsTicketForm |
static class |
OpenApiDecodeService.WxPubSuccessResponse |
| 构造器和说明 |
|---|
OpenApiDecodeService(org.springframework.web.client.RestTemplate restTemplate,
String host) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
deleteForResult(String requestUrl,
String query) |
protected <T> T |
getForResult(String requestUrl,
String query,
Class<T> responseType) |
protected String |
getHostRequestUrl(String url,
String query) |
protected String |
getNeedSignParamString(Map<String,?> paramMap) |
protected <E> E |
mapToObject(Map<String,Object> map,
Class<E> beanClass) |
protected Map<String,Object> |
objectToMap(Object obj) |
protected Map<String,Object> |
openApiParams(String appid,
String appSecret,
Map<String,Object> queryParams,
String requestUrl) |
protected <T> T |
postFilesForResult(String requestUrl,
String query,
Object requestData,
Class<T> responseType) |
protected <T> T |
postForResult(String requestUrl,
String query,
Object requestData,
Class<T> responseType) |
protected void |
putForResult(String requestUrl,
String query,
Object requestData) |
protected String |
signParams(Map<String,Object> apiParams,
String requestUrl,
String appSecret) |
OpenApiDecodeService.WxAppLoginResponse |
wxAppLogin(String appid,
String appSecret,
String wxAppId,
String code)
示例接口调用 小程序登录code换取openid
|
OpenApiDecodeService.WxPubSuccessResponse |
wxpubBuildAuthorizationUrl(String appid,
String appSecret,
String wxAppId,
String redirectURI,
String scope,
String state)
公众号获取授权验证url
|
WxAuthorizeUserVo |
wxpubExchangeAuthCodeToUserInfo(String appid,
String appSecret,
String wxAppId,
String code)
公众号授权码换取用户信息
|
Map |
wxpubGetJsTickets(String appid,
String appSecret,
String wxAppId,
String url)
公众号获取授权验证url
|
public OpenApiDecodeService(org.springframework.web.client.RestTemplate restTemplate,
String host)
public OpenApiDecodeService.WxAppLoginResponse wxAppLogin(String appid, String appSecret, String wxAppId, String code)
wxAppId - 登录appidcode - 登录codepublic OpenApiDecodeService.WxPubSuccessResponse wxpubBuildAuthorizationUrl(String appid, String appSecret, String wxAppId, String redirectURI, String scope, String state)
public Map wxpubGetJsTickets(String appid, String appSecret, String wxAppId, String url)
public WxAuthorizeUserVo wxpubExchangeAuthCodeToUserInfo(String appid, String appSecret, String wxAppId, String code)
protected <T> T postFilesForResult(String requestUrl, String query, Object requestData, Class<T> responseType)
protected <T> T postForResult(String requestUrl, String query, Object requestData, Class<T> responseType)
protected Map<String,Object> openApiParams(String appid, String appSecret, Map<String,Object> queryParams, String requestUrl)
protected String signParams(Map<String,Object> apiParams, String requestUrl, String appSecret)
protected <E> E mapToObject(Map<String,Object> map, Class<E> beanClass) throws Exception
ExceptionCopyright © 2020. All rights reserved.