Commit 1bd2829f by 吕明尚

修改对接实现类

parent a0f43653
......@@ -74,7 +74,7 @@ public class VendingMachineSreviceImpl implements VendingMachineSrevice {
map.put("api_token", accessToken);
map.put("version", "1.0");
JSONObject jsonObject = new JSONObject(map);
String url = StrUtil.format(VendingMachineConstants.DOMAIN + VendingMachineConstants.MACHINE_LIST, jsonObject.toString());
String url = VendingMachineConstants.DOMAIN + VendingMachineConstants.MACHINE_LIST;
String result = HttpRequest.post(url)
.contentType("application/json")
.body(jsonObject.toString()).execute().body();
......@@ -110,7 +110,7 @@ public class VendingMachineSreviceImpl implements VendingMachineSrevice {
map.put("api_token", accessToken);
map.put("version", "1.0");
JSONObject jsonObject = new JSONObject(map);
String url = StrUtil.format(VendingMachineConstants.DOMAIN + VendingMachineConstants.GOODS_LIST, jsonObject.toString());
String url = VendingMachineConstants.DOMAIN + VendingMachineConstants.GOODS_LIST;
String result = HttpRequest.post(url)
.contentType("application/json")
.body(jsonObject.toString()).execute().body();
......@@ -158,7 +158,7 @@ public class VendingMachineSreviceImpl implements VendingMachineSrevice {
map.put("version", "1.0");
map.put("machine_id", machineId);
JSONObject jsonObject = new JSONObject(map);
String url = StrUtil.format(VendingMachineConstants.DOMAIN + VendingMachineConstants.SHELF_LIST, jsonObject.toString());
String url = VendingMachineConstants.DOMAIN + VendingMachineConstants.SHELF_LIST;
String result = HttpRequest.post(url)
.contentType("application/json")
.body(jsonObject.toString()).execute().body();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment