mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 #1189 优化错误异常输出,移除冗余代码
This commit is contained in:
@@ -33,7 +33,7 @@ public class MaQrCodeApacheHttpRequestExecutor extends MaQrCodeRequestExecutor<C
|
||||
}
|
||||
|
||||
@Override
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam) throws WxErrorException, IOException {
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam, WxType wxType) throws WxErrorException, IOException {
|
||||
if (qrcodeParam != null && StringUtils.isNotBlank(qrcodeParam.getPagePath())) {
|
||||
if (uri.indexOf('?') == -1) {
|
||||
uri += '?';
|
||||
|
||||
@@ -31,7 +31,7 @@ public class MaQrCodeJoddHttpRequestExecutor extends MaQrCodeRequestExecutor<Htt
|
||||
}
|
||||
|
||||
@Override
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam) throws WxErrorException, IOException {
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam, WxType wxType) throws WxErrorException, IOException {
|
||||
if (qrcodeParam != null && StringUtils.isNotBlank(qrcodeParam.getPagePath())) {
|
||||
if (uri.indexOf('?') == -1) {
|
||||
uri += '?';
|
||||
|
||||
@@ -32,7 +32,7 @@ public class MaQrCodeOkhttpRequestExecutor extends MaQrCodeRequestExecutor<OkHtt
|
||||
}
|
||||
|
||||
@Override
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam) throws WxErrorException, IOException {
|
||||
public File execute(String uri, WxMaQrcodeParam qrcodeParam, WxType wxType) throws WxErrorException, IOException {
|
||||
if (qrcodeParam != null && StringUtils.isNotBlank(qrcodeParam.getPagePath())) {
|
||||
if (uri.indexOf('?') == -1) {
|
||||
uri += '?';
|
||||
|
||||
@@ -3,6 +3,7 @@ package me.chanjar.weixin.open.util.requestexecuter.ma;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import me.chanjar.weixin.common.WxType;
|
||||
import me.chanjar.weixin.common.error.WxError;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
||||
@@ -24,8 +25,8 @@ public abstract class MaQrCodeRequestExecutor<H, P> implements RequestExecutor<F
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(String uri, WxMaQrcodeParam data, ResponseHandler<File> handler) throws WxErrorException, IOException {
|
||||
handler.handle(this.execute(uri, data));
|
||||
public void execute(String uri, WxMaQrcodeParam data, ResponseHandler<File> handler, WxType wxType) throws WxErrorException, IOException {
|
||||
handler.handle(this.execute(uri, data, wxType));
|
||||
}
|
||||
|
||||
public static RequestExecutor<File, WxMaQrcodeParam> create(RequestHttp requestHttp) throws WxErrorException {
|
||||
|
||||
Reference in New Issue
Block a user