Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
wellbeing-dough committed Jan 24, 2024
2 parents b451028 + 89aa146 commit 69723bc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,13 @@ public Slice<GetMapInDrinksResponse> getMapInDrinks(Double startX, Double startY
log.info("*******************" + (endX - startX));
log.info("*******************" + (endY - startY));
double distance = calculateDistanceInKm(startX, startY, endX, endY);
log.info("^^^^^^^^^^^^^^^^^^^^^^^^^^" + distance);
if (distance < RANGE_OF_DRINK_MAP) {
log.info("이제 쿼리 나간다!!!!!!!!!!!!!!!!!!!" + distance);
PageRequest pageRequest = PageRequest.of(page, size);
Slice<MapInDrinkData> drinkData = drinkRepository.findDrinksByCoordinate(pageRequest, startX, startY, endX, endY);
return new SliceImpl<>(getGetMapInDrinksResponses(drinkData), drinkData.getPageable(), drinkData.hasNext());
} else {
log.info("쿼리 안나간다!!!!!!!!!!!!!!!!!!!" + distance);
return new SliceImpl<>(new ArrayList<>());
}
}
Expand Down

0 comments on commit 69723bc

Please sign in to comment.