Skip to content

Commit d81a5e3

Browse files
committed
简化代码
1 parent 41d5966 commit d81a5e3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.google.gson.JsonObject;
44
import me.chanjar.weixin.common.bean.result.WxError;
55
import me.chanjar.weixin.common.exception.WxErrorException;
6-
import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor;
76
import me.chanjar.weixin.mp.api.WxMpQrcodeService;
87
import me.chanjar.weixin.mp.api.WxMpService;
98
import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket;
@@ -52,7 +51,7 @@ public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds
5251
scene.addProperty("scene_id", sceneId);
5352
actionInfo.add("scene", scene);
5453
json.add("action_info", actionInfo);
55-
String responseContent = this.wxMpService.execute(new SimplePostRequestExecutor(), url, json.toString());
54+
String responseContent = this.wxMpService.post(url, json.toString());
5655
return WxMpQrCodeTicket.fromJson(responseContent);
5756
}
5857

@@ -70,7 +69,7 @@ public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorExcept
7069
scene.addProperty("scene_id", sceneId);
7170
actionInfo.add("scene", scene);
7271
json.add("action_info", actionInfo);
73-
String responseContent = this.wxMpService.execute(new SimplePostRequestExecutor(), url, json.toString());
72+
String responseContent = this.wxMpService.post(url, json.toString());
7473
return WxMpQrCodeTicket.fromJson(responseContent);
7574
}
7675

@@ -84,7 +83,7 @@ public WxMpQrCodeTicket qrCodeCreateLastTicket(String sceneStr) throws WxErrorEx
8483
scene.addProperty("scene_str", sceneStr);
8584
actionInfo.add("scene", scene);
8685
json.add("action_info", actionInfo);
87-
String responseContent = this.wxMpService.execute(new SimplePostRequestExecutor(), url, json.toString());
86+
String responseContent = this.wxMpService.post(url, json.toString());
8887
return WxMpQrCodeTicket.fromJson(responseContent);
8988
}
9089

0 commit comments

Comments
 (0)