Skip to content

Commit

Permalink
feat : 술 지도 기능 위도 경도 로깅
Browse files Browse the repository at this point in the history
  • Loading branch information
wellbeing-dough committed Jan 23, 2024
1 parent 52bc80f commit 5d6e7df
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import co.kr.jurumarble.utils.PageableConverter;
import co.kr.jurumarble.vote.enums.SortByType;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Slice;
import org.springframework.data.domain.SliceImpl;
Expand All @@ -35,6 +36,7 @@
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
@Slf4j
public class DrinkService {

private static final int FIXED_INDEX_OF_GETTING_HOT_DRINKS = 0;
Expand Down Expand Up @@ -95,10 +97,15 @@ private List<GetHotDrinksResponse> getGetHotDrinksResponses(List<HotDrinkData> h
}

public Slice<GetMapInDrinksResponse> getMapInDrinks(Double startX, Double startY, Double endX, Double endY, int page, int size) {
log.info("********************" + startX);
log.info("********************" + startY);
log.info("********************" + endX);
log.info("********************" + endY);
log.info("*******************" + (endX - startX));
log.info("*******************" + (endY - startY));
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());

}

private List<GetMapInDrinksResponse> getGetMapInDrinksResponses(Slice<MapInDrinkData> drinkData) {
Expand Down

0 comments on commit 5d6e7df

Please sign in to comment.