| | |
| | | end_point.put("longitude", end_lng); |
| | | dropoffPoint.put("point", end_point); |
| | | body.put("dropoffPoint", dropoffPoint); |
| | | logger.info("创建行程请求:{}", body.toJSONString()); |
| | | logger.info("创建行程请求:{} {}", tripId, body.toJSONString()); |
| | | HttpRequest request = post.body(body.toJSONString()); |
| | | HttpResponse response = request.execute(); |
| | | logger.info("创建行程结果:{}", response.body()); |
| | |
| | | dropoffPoint.put("point", end_point); |
| | | body.put("dropoffPoint", dropoffPoint); |
| | | } |
| | | logger.info("修改行程请求:{}", body.toJSONString()); |
| | | logger.info("修改行程请求:{} {}", tripId, body.toJSONString()); |
| | | HttpRequest request = put.body(body.toJSONString()); |
| | | HttpResponse response = request.execute(); |
| | | logger.info("修改行程结果:{}", response.body()); |
| | |
| | | * @return |
| | | */ |
| | | public boolean reportBillableEvent(String tripId) { |
| | | log.info("上报行程:{}", tripId); |
| | | String billableEventId = UUIDUtil.getRandomCode(); |
| | | String url = "https://mobilitybilling.googleapis.com/v1:reportBillableEvent?regionCode=GH&key=" + key + "&billableEventId=" + billableEventId; |
| | | HttpRequest post = HttpUtil.createPost(url); |