|
25 | 25 | import me.chanjar.weixin.common.util.http.MediaDownloadRequestExecutor; |
26 | 26 | import me.chanjar.weixin.common.util.http.MediaUploadRequestExecutor; |
27 | 27 | import me.chanjar.weixin.common.util.http.RequestExecutor; |
28 | | -import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; |
29 | | -import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; |
| 28 | +import me.chanjar.weixin.common.util.http.JoddGetRequestExecutor; |
| 29 | +import me.chanjar.weixin.common.util.http.JoddPostRequestExecutor; |
30 | 30 | import me.chanjar.weixin.common.util.http.URIUtil; |
31 | 31 | import me.chanjar.weixin.common.util.json.GsonHelper; |
32 | 32 | import me.chanjar.weixin.cp.bean.WxCpDepart; |
@@ -156,7 +156,7 @@ public String getJsapiTicket(boolean forceRefresh) throws WxErrorException { |
156 | 156 | synchronized (globalJsapiTicketRefreshLock) { |
157 | 157 | if (wxCpConfigStorage.isJsapiTicketExpired()) { |
158 | 158 | String url = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket"; |
159 | | - String responseContent = execute(new SimpleGetRequestExecutor(), url, null); |
| 159 | + String responseContent = execute(new JoddGetRequestExecutor(), url, null); |
160 | 160 | JsonElement tmpJsonElement = Streams.parse(new JsonReader(new StringReader(responseContent))); |
161 | 161 | JsonObject tmpJsonObject = tmpJsonElement.getAsJsonObject(); |
162 | 162 | String jsapiTicket = tmpJsonObject.get("ticket").getAsString(); |
@@ -256,7 +256,7 @@ public File mediaDownload(String media_id) throws WxErrorException { |
256 | 256 | public Integer departCreate(WxCpDepart depart) throws WxErrorException { |
257 | 257 | String url = "https://qyapi.weixin.qq.com/cgi-bin/department/create"; |
258 | 258 | String responseContent = execute( |
259 | | - new SimplePostRequestExecutor(), |
| 259 | + new JoddPostRequestExecutor(), |
260 | 260 | url, |
261 | 261 | depart.toJson()); |
262 | 262 | JsonElement tmpJsonElement = Streams.parse(new JsonReader(new StringReader(responseContent))); |
@@ -512,11 +512,11 @@ public String[] getCallbackIp() throws WxErrorException { |
512 | 512 | } |
513 | 513 |
|
514 | 514 | public String get(String url, String queryParam) throws WxErrorException { |
515 | | - return execute(new SimpleGetRequestExecutor(), url, queryParam); |
| 515 | + return execute(new JoddGetRequestExecutor(), url, queryParam); |
516 | 516 | } |
517 | 517 |
|
518 | 518 | public String post(String url, String postData) throws WxErrorException { |
519 | | - return execute(new SimplePostRequestExecutor(), url, postData); |
| 519 | + return execute(new JoddPostRequestExecutor(), url, postData); |
520 | 520 | } |
521 | 521 |
|
522 | 522 | /** |
@@ -685,12 +685,5 @@ public void setTmpDirFile(File tmpDirFile) { |
685 | 685 | this.tmpDirFile = tmpDirFile; |
686 | 686 | } |
687 | 687 |
|
688 | | - public static void main(String[] args) { |
689 | | - Float a = 3.1f; |
690 | | - System.out.println(3.1d); |
691 | | - System.out.println(new BigDecimal(3.1d)); |
692 | | - System.out.println(new BigDecimal(a)); |
693 | | - System.out.println(a.toString()); |
694 | | - System.out.println(a.doubleValue()); |
695 | | - } |
| 688 | + |
696 | 689 | } |
0 commit comments