Skip to content

Commit e6c8010

Browse files
committed
清理简化代码
1 parent 6b1b7f1 commit e6c8010

File tree

4 files changed

+5
-20
lines changed

4 files changed

+5
-20
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/AbstractWxMpServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,9 @@ public WxMpDeviceService getDeviceService() {
400400
public WxMpShakeService getShakeService(){
401401
return this.shakeService;
402402
}
403+
404+
@Override
405+
public RequestHttp getRequestHttp() {
406+
return this;
407+
}
403408
}

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceApacheHttpClientImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import me.chanjar.weixin.common.bean.result.WxError;
55
import me.chanjar.weixin.common.exception.WxErrorException;
66
import me.chanjar.weixin.common.util.http.HttpType;
7-
import me.chanjar.weixin.common.util.http.RequestHttp;
87
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
98
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
109
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
@@ -61,11 +60,6 @@ public void initHttp() {
6160
this.httpClient = apacheHttpClientBuilder.build();
6261
}
6362

64-
@Override
65-
public RequestHttp getRequestHttp() {
66-
return this;
67-
}
68-
6963
@Override
7064
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
7165
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceJoddHttpImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import me.chanjar.weixin.common.bean.result.WxError;
77
import me.chanjar.weixin.common.exception.WxErrorException;
88
import me.chanjar.weixin.common.util.http.HttpType;
9-
import me.chanjar.weixin.common.util.http.RequestHttp;
109
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
1110
import me.chanjar.weixin.mp.api.WxMpService;
1211

@@ -46,12 +45,6 @@ public void initHttp() {
4645
httpClient = JoddHttp.httpConnectionProvider;
4746
}
4847

49-
@Override
50-
public RequestHttp getRequestHttp() {
51-
return this;
52-
}
53-
54-
5548
@Override
5649
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
5750
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceOkHttpImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import me.chanjar.weixin.common.bean.result.WxError;
55
import me.chanjar.weixin.common.exception.WxErrorException;
66
import me.chanjar.weixin.common.util.http.HttpType;
7-
import me.chanjar.weixin.common.util.http.RequestHttp;
87
import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo;
98
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
109
import me.chanjar.weixin.mp.api.WxMpService;
@@ -94,10 +93,4 @@ public void initHttp() {
9493
httpClient = new ConnectionPool();
9594
}
9695

97-
@Override
98-
public RequestHttp getRequestHttp() {
99-
return this;
100-
}
101-
102-
10396
}

0 commit comments

Comments
 (0)