| | |
| | | public static String inverseGeographicalAnalysis(String lon, String lat, boolean poi){ |
| | | HttpRequest get = HttpUtil.createGet("https://apis.map.qq.com/ws/geocoder/v1/?location=" + lat + "," + lon + "&key=" + key + "&get_poi=" + (poi ? 1 : 0)); |
| | | HttpResponse execute = get.execute(); |
| | | log.info("经纬度转行政区:{}", execute.body()); |
| | | JSONObject jsonObject = JSON.parseObject(execute.body()); |
| | | Integer status = jsonObject.getInteger("status"); |
| | | if(0 != status){ |
| | |
| | | } |
| | | |
| | | //开始构建支付数据 |
| | | //现金支付 |
| | | paymentMoney = paymentMoney.add(expressFee).setScale(2, RoundingMode.HALF_EVEN); |
| | | if(BigDecimal.ZERO.compareTo(paymentMoney) > 0){ |
| | | paymentMoney = BigDecimal.ZERO; |
| | | } |
| | | if(1 == shoppingCartPayment.getPaymentType()){ |
| | | if(BigDecimal.ZERO.compareTo(paymentMoney) < 0){ |
| | | //调起微信支付 |