mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-25 13:35:15 +08:00
update 默认分隔符
This commit is contained in:
@@ -69,7 +69,7 @@ public class AddressUtils {
|
||||
if (StringUtils.isBlank(areaCode) || StringUtils.isBlank(address)) {
|
||||
return null;
|
||||
}
|
||||
String[] split = StringUtils.split(areaCode, ",");
|
||||
String[] split = StringUtils.split(areaCode, Constants.DEFAULT_DELIMITER);
|
||||
String param = "key=" + AMAP_GET_LOCATION_KEY + "&city=" + split[2] + "&address=" + address;
|
||||
String resultStr = HttpUtils.sendGet(AMAP_GET_LOCATION_URL, param, Constants.UTF8);
|
||||
if (StringUtils.isNotBlank(resultStr)) {
|
||||
@@ -81,7 +81,7 @@ public class AddressUtils {
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
JSONObject jsonObject = geocodes.getJSONObject(0);
|
||||
String location = jsonObject.getString("location");
|
||||
String[] strArr = StringUtils.split(location, ",");
|
||||
String[] strArr = StringUtils.split(location, Constants.DEFAULT_DELIMITER);
|
||||
map.put("lng", strArr[0]);
|
||||
map.put("lat", strArr[1]);
|
||||
return map;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.common.util.ip;
|
||||
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -200,8 +201,8 @@ public class IpUtils {
|
||||
*/
|
||||
public static String getMultistageReverseProxyIp(String ip) {
|
||||
// 多级反向代理检测
|
||||
if (ip != null && ip.indexOf(",") > 0) {
|
||||
final String[] ips = ip.trim().split(",");
|
||||
if (ip != null && ip.indexOf(Constants.DEFAULT_DELIMITER) > 0) {
|
||||
final String[] ips = ip.trim().split(Constants.DEFAULT_DELIMITER);
|
||||
for (String subIp : ips) {
|
||||
if (false == isUnknown(subIp)) {
|
||||
ip = subIp;
|
||||
|
||||
Reference in New Issue
Block a user