mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
Merge branch 'tianmu' into develop
This commit is contained in:
@@ -30,15 +30,15 @@ import java.util.UUID;
|
||||
public class QrCodeRequestExecutor implements RequestExecutor<File, WxMpQrCodeTicket> {
|
||||
|
||||
@Override
|
||||
public File execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, WxMpQrCodeTicket ticket) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public File execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri,
|
||||
WxMpQrCodeTicket ticket) throws WxErrorException, ClientProtocolException, IOException {
|
||||
if (ticket != null) {
|
||||
if (uri.indexOf('?') == -1) {
|
||||
uri += '?';
|
||||
}
|
||||
uri += uri.endsWith("?") ?
|
||||
"ticket=" + URLEncoder.encode(ticket.getTicket(), "UTF-8")
|
||||
:
|
||||
"&ticket=" + URLEncoder.encode(ticket.getTicket(), "UTF-8");
|
||||
uri += uri.endsWith("?")
|
||||
? "ticket=" + URLEncoder.encode(ticket.getTicket(), "UTF-8")
|
||||
: "&ticket=" + URLEncoder.encode(ticket.getTicket(), "UTF-8");
|
||||
}
|
||||
|
||||
HttpGet httpGet = new HttpGet(uri);
|
||||
@@ -59,7 +59,7 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, WxMpQrCodeTi
|
||||
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);
|
||||
|
||||
return FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), "jpg");
|
||||
}finally {
|
||||
} finally {
|
||||
httpGet.releaseConnection();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.WxMpCard;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by YuJian on 15/11/11.
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.WxMpCard;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpCardResult;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by YuJian on 15/11/11.
|
||||
|
||||
Reference in New Issue
Block a user