|
@@ -1,23 +1,9 @@ |
|
|
package me.chanjar.weixin.mp.api.impl; |
|
|
package me.chanjar.weixin.mp.api.impl; |
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.http.HttpHost; |
|
|
|
|
|
import org.apache.http.client.config.RequestConfig; |
|
|
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse; |
|
|
|
|
|
import org.apache.http.client.methods.HttpGet; |
|
|
|
|
|
import org.apache.http.conn.ssl.DefaultHostnameVerifier; |
|
|
|
|
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
|
|
|
|
|
import org.apache.http.impl.client.BasicResponseHandler; |
|
|
|
|
|
import org.apache.http.impl.client.CloseableHttpClient; |
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import com.google.gson.JsonArray; |
|
|
import com.google.gson.JsonArray; |
|
|
import com.google.gson.JsonElement; |
|
|
import com.google.gson.JsonElement; |
|
|
import com.google.gson.JsonObject; |
|
|
import com.google.gson.JsonObject; |
|
|
import com.google.gson.JsonParser; |
|
|
import com.google.gson.JsonParser; |
|
|
|
|
|
|
|
|
import me.chanjar.weixin.common.bean.WxAccessToken; |
|
|
import me.chanjar.weixin.common.bean.WxAccessToken; |
|
|
import me.chanjar.weixin.common.bean.WxJsapiSignature; |
|
|
import me.chanjar.weixin.common.bean.WxJsapiSignature; |
|
|
import me.chanjar.weixin.common.bean.result.WxError; |
|
|
import me.chanjar.weixin.common.bean.result.WxError; |
|
@@ -26,37 +12,22 @@ import me.chanjar.weixin.common.session.StandardSessionManager; |
|
|
import me.chanjar.weixin.common.session.WxSessionManager; |
|
|
import me.chanjar.weixin.common.session.WxSessionManager; |
|
|
import me.chanjar.weixin.common.util.RandomUtils; |
|
|
import me.chanjar.weixin.common.util.RandomUtils; |
|
|
import me.chanjar.weixin.common.util.crypto.SHA1; |
|
|
import me.chanjar.weixin.common.util.crypto.SHA1; |
|
|
import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder; |
|
|
|
|
|
import me.chanjar.weixin.common.util.http.DefaultApacheHttpClientBuilder; |
|
|
|
|
|
import me.chanjar.weixin.common.util.http.RequestExecutor; |
|
|
|
|
|
import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; |
|
|
|
|
|
import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; |
|
|
|
|
|
import me.chanjar.weixin.common.util.http.URIUtil; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpCardService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpConfigStorage; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpDataCubeService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpGroupService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpKefuService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpMaterialService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpMenuService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpPayService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpQrcodeService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpService; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.WxMpUserService; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpCustomMessage; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpIndustry; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpMassGroupMessage; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpMassNews; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpMassOpenIdsMessage; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpMassPreviewMessage; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpMassVideo; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpSemanticQuery; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.WxMpTemplateMessage; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.WxMpMassUploadResult; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.WxMpSemanticQueryResult; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.WxMpUser; |
|
|
|
|
|
|
|
|
import me.chanjar.weixin.common.util.http.*; |
|
|
|
|
|
import me.chanjar.weixin.mp.api.*; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.*; |
|
|
|
|
|
import me.chanjar.weixin.mp.bean.result.*; |
|
|
|
|
|
import org.apache.http.HttpHost; |
|
|
|
|
|
import org.apache.http.client.config.RequestConfig; |
|
|
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse; |
|
|
|
|
|
import org.apache.http.client.methods.HttpGet; |
|
|
|
|
|
import org.apache.http.conn.ssl.DefaultHostnameVerifier; |
|
|
|
|
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
|
|
|
|
|
import org.apache.http.impl.client.BasicResponseHandler; |
|
|
|
|
|
import org.apache.http.impl.client.CloseableHttpClient; |
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
public class WxMpServiceImpl implements WxMpService { |
|
|
public class WxMpServiceImpl implements WxMpService { |
|
|
|
|
|
|
|
@@ -86,6 +57,8 @@ public class WxMpServiceImpl implements WxMpService { |
|
|
|
|
|
|
|
|
private WxMpGroupService groupService = new WxMpGroupServiceImpl(this); |
|
|
private WxMpGroupService groupService = new WxMpGroupServiceImpl(this); |
|
|
|
|
|
|
|
|
|
|
|
private WxMpUserTagService tagService = new WxMpUserTagServiceImpl(this); |
|
|
|
|
|
|
|
|
private WxMpQrcodeService qrCodeService = new WxMpQrcodeServiceImpl(this); |
|
|
private WxMpQrcodeService qrCodeService = new WxMpQrcodeServiceImpl(this); |
|
|
|
|
|
|
|
|
private WxMpCardService cardService = new WxMpCardServiceImpl(this); |
|
|
private WxMpCardService cardService = new WxMpCardServiceImpl(this); |
|
@@ -534,6 +507,11 @@ public class WxMpServiceImpl implements WxMpService { |
|
|
return this.groupService; |
|
|
return this.groupService; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public WxMpUserTagService getUserTagService() { |
|
|
|
|
|
return this.tagService; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public WxMpQrcodeService getQrcodeService() { |
|
|
public WxMpQrcodeService getQrcodeService() { |
|
|
return this.qrCodeService; |
|
|
return this.qrCodeService; |
|
|