Pu Zhibing
2025-04-22 fd7b8fb7c89832c28a838b0449bbb8a392433ee2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/tencentMap/TencentMapUtil.java
@@ -27,11 +27,12 @@
   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){
         log.error(jsonObject.getString("message"));
         return null;
         throw new RuntimeException(jsonObject.getString("message"));
      }
      JSONObject result = jsonObject.getJSONObject("result");
      JSONObject ad_info = result.getJSONObject("ad_info");