From 661cc0afdb7699abcaafff23fa2fe9283979ee06 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 14 五月 2020 16:25:43 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue

---
 ruoyi/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java |  112 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java
index c36431f..4d2041e 100644
--- a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java
+++ b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java
@@ -1,56 +1,56 @@
-package com.ruoyi.common.utils.ip;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.http.HttpUtils;
-import com.ruoyi.framework.config.RuoYiConfig;
-
-/**
- * 鑾峰彇鍦板潃绫�
- * 
- * @author ruoyi
- */
-public class AddressUtils
-{
-    private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
-
-    // IP鍦板潃鏌ヨ
-    public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
-
-    // 鏈煡鍦板潃
-    public static final String UNKNOWN = "XX XX";
-
-    public static String getRealAddressByIP(String ip)
-    {
-        String address = UNKNOWN;
-        // 鍐呯綉涓嶆煡璇�
-        if (IpUtils.internalIp(ip))
-        {
-            return "鍐呯綉IP";
-        }
-        if (RuoYiConfig.isAddressEnabled())
-        {
-            try
-            {
-                String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
-                if (StringUtils.isEmpty(rspStr))
-                {
-                    log.error("鑾峰彇鍦扮悊浣嶇疆寮傚父 {}", ip);
-                    return UNKNOWN;
-                }
-                JSONObject obj = JSONObject.parseObject(rspStr);
-                String region = obj.getString("pro");
-                String city = obj.getString("city");
-                return String.format("%s %s", region, city);
-            }
-            catch (Exception e)
-            {
-                log.error("鑾峰彇鍦扮悊浣嶇疆寮傚父 {}", ip);
-            }
-        }
-        return address;
-    }
-}
+package com.ruoyi.common.utils.ip;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+
+/**
+ * 鑾峰彇鍦板潃绫�
+ * 
+ * @author ruoyi
+ */
+public class AddressUtils
+{
+    private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
+
+    // IP鍦板潃鏌ヨ
+    public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
+
+    // 鏈煡鍦板潃
+    public static final String UNKNOWN = "XX XX";
+
+    public static String getRealAddressByIP(String ip)
+    {
+        String address = UNKNOWN;
+        // 鍐呯綉涓嶆煡璇�
+        if (IpUtils.internalIp(ip))
+        {
+            return "鍐呯綉IP";
+        }
+        if (RuoYiConfig.isAddressEnabled())
+        {
+            try
+            {
+                String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
+                if (StringUtils.isEmpty(rspStr))
+                {
+                    log.error("鑾峰彇鍦扮悊浣嶇疆寮傚父 {}", ip);
+                    return UNKNOWN;
+                }
+                JSONObject obj = JSONObject.parseObject(rspStr);
+                String region = obj.getString("pro");
+                String city = obj.getString("city");
+                return String.format("%s %s", region, city);
+            }
+            catch (Exception e)
+            {
+                log.error("鑾峰彇鍦扮悊浣嶇疆寮傚父 {}", ip);
+            }
+        }
+        return address;
+    }
+}

--
Gitblit v1.9.3