fix 城市为null

luoyang 5 years ago
parent da9951c133
commit 5ea9ba1afe

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.2.22</version> <version>1.2.23</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -389,7 +389,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
List<JSONObject> mostUseAddressByCustomer = orderAnalysisMapper.mostUseAddressByCustomer(params); List<JSONObject> mostUseAddressByCustomer = orderAnalysisMapper.mostUseAddressByCustomer(params);
for (JSONObject address : mostUseAddressByCustomer) { for (JSONObject address : mostUseAddressByCustomer) {
String city = lookupService.getLocation(address.getString("customer_ip")).city; String city = lookupService.getLocation(address.getString("customer_ip")).city;
if (topAddress.size() < 3 && !topAddress.contains(city) && StringUtils.isNotBlank(city)) { if (topAddress.size() < 3 && !topAddress.contains(city) && StringUtils.isNotBlank(city) && city != null) {
topAddress.add(city); topAddress.add(city);
} }
} }

Loading…
Cancel
Save