diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java index 33846da5c2..8aabf5f5d9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java @@ -62,8 +62,6 @@ public class IpUtils { if (StringUtils.isEmpty(ip) || IP_UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getRemoteAddr(); } - - logger.info("getIpAddr origin ip:{}",ip); //对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 if (ip != null) { //"***.***.***.***".length() = 15 if (ip.indexOf(StrConstant.COMMA) > 0) { @@ -74,6 +72,7 @@ public class IpUtils { } catch (Exception e) { logger.error("IpUtils getIpAddr ERROR ", e); } + return ip; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 267ef87956..cde9814019 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -337,7 +337,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl list = testExcelImportResult.getList(); if (CollectionUtils.isNotEmpty(list)){ String customerId = tokenDto.getCustomerId(); - List existsNames = baseDao.selectOrgByOrgName(list.stream().map(m -> m.getOrganizationName()).collect(Collectors.toList()), customerId); + List existsNames = baseDao.selectOrgByOrgName(list.stream().map(ImportCommunitySelfOrganization::getOrganizationName).collect(Collectors.toList()), customerId); Map> groupByName = list.stream().collect(Collectors.groupingBy(ImportCommunitySelfOrganization::getOrganizationName)); groupByName.forEach((k,v) -> { if (v.size() > NumConstant.ONE){ @@ -399,4 +399,4 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl