|
|
@ -28,7 +28,8 @@ public class IpUtil {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String ipLocation = searcher.search(ip);
|
|
|
|
String ipLocation = searcher.search(ip);
|
|
|
|
if (ipLocation.startsWith(Constants.IP_LOCATION_CHINA)) {
|
|
|
|
if (ipLocation.startsWith(Constants.IP_LOCATION_CHINA)) {
|
|
|
|
return ipLocation.split("\\|")[2].replaceFirst("省", "");
|
|
|
|
String province = ipLocation.split("\\|")[2].replaceFirst("省", "");
|
|
|
|
|
|
|
|
return "0".equals(province)?UNKNOW_IP:province;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ipLocation.contains(INTERNAL_IP)) {
|
|
|
|
if (ipLocation.contains(INTERNAL_IP)) {
|
|
|
|
return INTERNAL_IP;
|
|
|
|
return INTERNAL_IP;
|
|
|
|