diff --git a/pom.xml b/pom.xml index d15f09e8..9424ed41 100644 --- a/pom.xml +++ b/pom.xml @@ -75,6 +75,7 @@ knife4j-spring-boot-starter 3.0.3 + diff --git a/src/main/java/com/chint/infrastructure/repository/LocationRepositoryImpl.java b/src/main/java/com/chint/infrastructure/repository/LocationRepositoryImpl.java index 11dfb069..ebd2b9ae 100644 --- a/src/main/java/com/chint/infrastructure/repository/LocationRepositoryImpl.java +++ b/src/main/java/com/chint/infrastructure/repository/LocationRepositoryImpl.java @@ -85,8 +85,6 @@ public class LocationRepositoryImpl implements LocationRepository { @Override public List findHotCitiesByCityName(List locationNames) { - List hotCities = - jdbcLocationRepository.findByLocationNameInAndLocationPathContainingAndLevel(locationNames,"3106_1_",3); - return hotCities; + return jdbcLocationRepository.findByLocationNameInAndLocationPathContainingAndLevel(locationNames,"3106_1_",3); } } diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLocationRepository.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLocationRepository.java index 7a1a4841..3cfdb05b 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLocationRepository.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLocationRepository.java @@ -27,5 +27,7 @@ public interface JdbcLocationRepository extends CrudRepository { List findByLocationNameIn(Collection locationName); + List findByLocationNameInAndLocationPathContainingAndLevel(Collection locationName, String locationPath, Integer level) + List findByLocationIdIn(Collection locationId); }