commit
8b03af182c
|
@ -17,6 +17,7 @@ import java.util.List;
|
|||
|
||||
import static com.chint.infrastructure.constant.CommonMessageConstant.NOT_FOUND;
|
||||
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_AIRPLANE;
|
||||
import static com.chint.infrastructure.constant.LocationConstant.LOCATION_TYPE_CITY;
|
||||
|
||||
@Repository
|
||||
public class LocationRepositoryImpl implements LocationRepository {
|
||||
|
@ -65,7 +66,7 @@ public class LocationRepositoryImpl implements LocationRepository {
|
|||
|
||||
@Override
|
||||
public Location findByCityId(Long cityId) {
|
||||
return jdbcLocationRepository.findByCityId(cityId);
|
||||
return jdbcLocationRepository.findByCityIdAndLevel(cityId, LOCATION_TYPE_CITY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ public interface JdbcLocationRepository extends CrudRepository<Location, Long> {
|
|||
|
||||
Location findByLocationId(Long locationId);
|
||||
|
||||
Location findByCityId(Long cityId);
|
||||
Location findByCityIdAndLevel(Long cityId, Integer level);
|
||||
|
||||
Location findByLocationShortName(String locationShortName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue