public abstract class BaseWxMaServiceImpl<H,P> extends Object implements WxMaService, RequestHttp<H,P>
doGetAccessTokenRequest()| 限定符和类型 | 字段和说明 |
|---|---|
protected static com.google.gson.Gson |
GSON |
protected static String[] |
urlPathSupportApiSignature
开启API签名验证后需要API签名的接口,根据 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/
整理,uri包含下这些字符串且配置了api signature aes ras key 自动用签名接口
|
GET_ACCESS_TOKEN_URL, GET_PAID_UNION_ID_URL, GET_STABLE_ACCESS_TOKEN, JSCODE_TO_SESSION_URL, SET_DYNAMIC_DATA_URL| 构造器和说明 |
|---|
BaseWxMaServiceImpl() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitHttpgetRequestHttpClient, getRequestHttpProxy, getRequestTypeprotected static final String[] urlPathSupportApiSignature
protected static final com.google.gson.Gson GSON
public RequestHttp<H,P> getRequestHttp()
WxMaServicegetRequestHttp 在接口中 WxMaServicepublic String getPaidUnionId(String openid, String transactionId, String mchId, String outTradeNo) throws WxErrorException
WxMaServicegetPaidUnionId 在接口中 WxMaServiceopenid - 支付用户唯一标识(必填)transactionId - 微信支付订单号(可选)mchId - 微信支付分配的商户号,与商户订单号配合使用(可选)outTradeNo - 微信支付商户订单号,与商户号配合使用(可选)WxErrorException - 调用微信接口失败时抛出public WxMaJscode2SessionResult jsCode2SessionInfo(String jsCode) throws WxErrorException
WxMaServicejsCode2SessionInfo 在接口中 WxMaServicejsCode - 登录时获取的 codeWxErrorException - 调用微信接口失败时抛出public void setDynamicData(int lifespan,
String type,
int scene,
String data)
throws WxErrorException
WxMaServicesetDynamicData 在接口中 WxMaServicelifespan - 数据有效时间(秒),如 86400 表示一天type - 数据所属服务类目标识scene - 场景值,1 代表用于搜索的数据data - 推送到微信后台的数据列表(字符串类型)WxErrorException - 调用微信接口失败时抛出public boolean checkSignature(String timestamp, String nonce, String signature)
WxMaServicecheckSignature 在接口中 WxMaServicetimestamp - 时间戳nonce - 随机数signature - 签名字符串public String getAccessToken() throws WxErrorException
WxMaServicegetAccessToken 在接口中 WxMaServiceWxErrorException - 调用微信接口失败时抛出WxMaService.getAccessToken(boolean)public String getAccessToken(boolean forceRefresh) throws WxErrorException
WxMaServicegetAccessToken 在接口中 WxMaServiceforceRefresh - 是否强制刷新WxErrorException - 调用微信接口失败时抛出protected abstract String doGetAccessTokenRequest() throws IOException
IOException - .protected abstract String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException
IOException - .public String get(String url, String queryParam) throws WxErrorException
get 在接口中 WxServiceWxErrorExceptionpublic String post(String url, String postData) throws WxErrorException
post 在接口中 WxServiceWxErrorExceptionpublic String post(String url, Object obj) throws WxErrorException
post 在接口中 WxServiceWxErrorExceptionpublic String post(String url, ToJson obj) throws WxErrorException
post 在接口中 WxServiceWxErrorExceptionpublic String post(String url, com.google.gson.JsonObject jsonObject) throws WxErrorException
post 在接口中 WxServiceWxErrorExceptionpublic String upload(String url, CommonUploadParam param) throws WxErrorException
upload 在接口中 WxServiceWxErrorExceptionpublic <R,T> R execute(RequestExecutor<R,T> executor, String uri, T data) throws WxErrorException
execute 在接口中 WxMaServiceR - 返回的数据类型T - 请求参数的数据类型executor - 执行器对象uri - 接口请求地址data - 请求参数或数据WxErrorException - 微信接口调用异常public WxMaApiResponse execute(ApiSignaturePostRequestExecutor<?,?> executor, String uri, Map<String,String> headers, String data) throws WxErrorException
WxMaServiceexecute 在接口中 WxMaServiceexecutor - 签名请求执行器uri - 接口请求地址headers - 请求头信息data - 请求数据WxErrorException - 微信接口调用异常protected String extractAccessToken(String resultContent) throws WxErrorException
resultContent - 响应内容WxErrorException - 异常public WxMaConfig getWxMaConfig()
WxMaServicegetWxMaConfig 在接口中 WxMaServicepublic void setWxMaConfig(WxMaConfig maConfig)
WxMaServicesetWxMaConfig 在接口中 WxMaServicemaConfig - 小程序配置信息对象public void setMultiConfigs(Map<String,WxMaConfig> configs)
WxMaServicesetMultiConfigs 在接口中 WxMaServiceconfigs - 小程序配置Map,key为小程序标识public void setMultiConfigs(Map<String,WxMaConfig> configs, String defaultMiniappId)
WxMaServicesetMultiConfigs 在接口中 WxMaServiceconfigs - 小程序配置Map,key为小程序标识defaultMiniappId - 默认小程序标识public void addConfig(String miniappId, WxMaConfig configStorages)
WxMaServiceaddConfig 在接口中 WxMaServiceminiappId - 小程序唯一标识configStorages - 新的小程序配置信息public void removeConfig(String miniappId)
WxMaServiceremoveConfig 在接口中 WxMaServiceminiappId - 小程序唯一标识public WxMaService switchoverTo(String miniAppId)
WxMaServiceswitchoverTo 在接口中 WxMaServiceminiAppId - 小程序标识public WxMaService switchoverTo(String miniAppId, java.util.function.Function<String,WxMaConfig> func)
WxMaServiceswitchoverTo 在接口中 WxMaServiceminiAppId - 小程序标识func - 获取配置的函数public boolean switchover(String mpId)
WxMaServiceswitchover 在接口中 WxMaServicempId - 公众号标识public void setRetrySleepMillis(int retrySleepMillis)
WxMaServicesetRetrySleepMillis 在接口中 WxMaServiceretrySleepMillis - 重试等待的毫秒数,默认1000mspublic void setMaxRetryTimes(int maxRetryTimes)
WxMaServicesetMaxRetryTimes 在接口中 WxMaServicemaxRetryTimes - 最大重试次数,默认5次public WxMaMsgService getMsgService()
WxMaServicegetMsgService 在接口中 WxMaServicepublic WxMaMediaService getMediaService()
WxMaServicegetMediaService 在接口中 WxMaServicepublic WxMaUserService getUserService()
WxMaServicegetUserService 在接口中 WxMaServicepublic WxMaQrcodeService getQrcodeService()
WxMaServicegetQrcodeService 在接口中 WxMaServicepublic WxMaSchemeService getWxMaSchemeService()
WxMaServicegetWxMaSchemeService 在接口中 WxMaServicepublic WxMaSubscribeService getSubscribeService()
WxMaServicegetSubscribeService 在接口中 WxMaServicepublic WxMaAnalysisService getAnalysisService()
WxMaServicegetAnalysisService 在接口中 WxMaServicepublic WxMaCodeService getCodeService()
WxMaServicegetCodeService 在接口中 WxMaServicepublic WxMaJsapiService getJsapiService()
WxMaServicegetJsapiService 在接口中 WxMaServicepublic WxMaSettingService getSettingService()
WxMaServicegetSettingService 在接口中 WxMaServicepublic WxMaShareService getShareService()
WxMaServicegetShareService 在接口中 WxMaServicepublic WxMaRunService getRunService()
WxMaServicegetRunService 在接口中 WxMaServicepublic WxMaSecurityService getSecurityService()
WxMaServicegetSecurityService 在接口中 WxMaServicepublic WxMaPluginService getPluginService()
WxMaServicegetPluginService 在接口中 WxMaServicepublic WxMaExpressService getExpressService()
WxMaServicegetExpressService 在接口中 WxMaServicepublic WxMaCloudService getCloudService()
WxMaServicegetCloudService 在接口中 WxMaServicepublic WxMaInternetService getInternetService()
WxMaServicegetInternetService 在接口中 WxMaServicepublic WxMaLiveService getLiveService()
WxMaServicegetLiveService 在接口中 WxMaServicepublic WxMaLiveGoodsService getLiveGoodsService()
WxMaServicegetLiveGoodsService 在接口中 WxMaServicepublic WxMaLiveMemberService getLiveMemberService()
WxMaServicegetLiveMemberService 在接口中 WxMaServicepublic WxOcrService getOcrService()
WxMaServicegetOcrService 在接口中 WxMaServicepublic WxImgProcService getImgProcService()
WxMaServicegetImgProcService 在接口中 WxMaServicepublic WxMaShopSpuService getShopSpuService()
WxMaServicegetShopSpuService 在接口中 WxMaServicepublic WxMaShopOrderService getShopOrderService()
WxMaServicegetShopOrderService 在接口中 WxMaServicepublic WxMaShopRegisterService getShopRegisterService()
WxMaServicegetShopRegisterService 在接口中 WxMaServicepublic WxMaShopAccountService getShopAccountService()
WxMaServicegetShopAccountService 在接口中 WxMaServicepublic WxMaShopCatService getShopCatService()
WxMaServicegetShopCatService 在接口中 WxMaServicepublic WxMaShopImgService getShopImgService()
WxMaServicegetShopImgService 在接口中 WxMaServicepublic WxMaShopAuditService getShopAuditService()
WxMaServicegetShopAuditService 在接口中 WxMaServicepublic WxMaShopAfterSaleService getShopAfterSaleService()
WxMaServicegetShopAfterSaleService 在接口中 WxMaServicepublic WxMaShopDeliveryService getShopDeliveryService()
WxMaServicegetShopDeliveryService 在接口中 WxMaServicepublic WxMaLinkService getLinkService()
WxMaServicegetLinkService 在接口中 WxMaServicepublic WxMaReimburseInvoiceService getReimburseInvoiceService()
WxMaServicegetReimburseInvoiceService 在接口中 WxMaServicepublic WxMaDeviceSubscribeService getDeviceSubscribeService()
WxMaServicegetDeviceSubscribeService 在接口中 WxMaServicepublic WxMaMarketingService getMarketingService()
WxMaServicegetMarketingService 在接口中 WxMaServicepublic WxMaImmediateDeliveryService getWxMaImmediateDeliveryService()
WxMaServicegetWxMaImmediateDeliveryService 在接口中 WxMaServicepublic WxMaShopSharerService getShopSharerService()
WxMaServicegetShopSharerService 在接口中 WxMaServicepublic WxMaProductService getProductService()
WxMaServicegetProductService 在接口中 WxMaServicepublic WxMaProductOrderService getProductOrderService()
WxMaServicegetProductOrderService 在接口中 WxMaServicepublic WxMaShopCouponService getWxMaShopCouponService()
WxMaServicegetWxMaShopCouponService 在接口中 WxMaServicepublic WxMaShopPayService getWxMaShopPayService()
WxMaServicegetWxMaShopPayService 在接口中 WxMaServicepublic WxMaOrderShippingService getWxMaOrderShippingService()
getWxMaOrderShippingService 在接口中 WxMaServicepublic WxMaOrderManagementService getWxMaOrderManagementService()
getWxMaOrderManagementService 在接口中 WxMaServicepublic WxMaOpenApiService getWxMaOpenApiService()
WxMaServicegetWxMaOpenApiService 在接口中 WxMaServicepublic WxMaVodService getWxMaVodService()
WxMaServicegetWxMaVodService 在接口中 WxMaServicepublic WxMaXPayService getWxMaXPayService()
WxMaServicegetWxMaXPayService 在接口中 WxMaServicepublic WxMaExpressDeliveryReturnService getWxMaExpressDeliveryReturnService()
WxMaServicegetWxMaExpressDeliveryReturnService 在接口中 WxMaServicepublic WxMaPromotionService getWxMaPromotionService()
WxMaServicegetWxMaPromotionService 在接口中 WxMaServicepublic String postWithSignature(String url, Object obj) throws WxErrorException
WxMaServicepostWithSignature 在接口中 WxMaServiceurl - 请求地址obj - 请求对象WxErrorException - 微信接口调用异常public String postWithSignature(String url, com.google.gson.JsonObject jsonObject) throws WxErrorException
WxMaServicepostWithSignature 在接口中 WxMaServiceurl - 请求地址jsonObject - 请求的Json对象WxErrorException - 微信接口调用异常public WxMaIntracityService getIntracityService()
WxMaServicegetIntracityService 在接口中 WxMaServiceCopyright © 2025. All rights reserved.