Skip to content

Commit

Permalink
Merge pull request #51 from AlongTheBlue/develop
Browse files Browse the repository at this point in the history
[Refactor] 클래스에 맞춰 변수명 변경
  • Loading branch information
MoonInbae authored Oct 13, 2024
2 parents a75d660 + f53c000 commit 108794a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1037,11 +1037,11 @@ public ApiResponse<Page<SimpleInformation>> retrieveAll(int page, int size) {
Pageable pageable = PageRequest.of(page, size);

// 1. Cafe 기준으로 페이징 처리된 데이터를 조회
Page<SimpleInformation> cafePage = accommodationRepository.findAllSimple(pageable);
Page<SimpleInformation> accommodationPage = accommodationRepository.findAllSimple(pageable);

// CustomPage 객체로 변환 (기존 페이지네이션 정보와 category를 함께 담음)
CustomPage<SimpleInformation> customPage = new CustomPage<>(
cafePage.getContent(), pageable, cafePage.getTotalElements(), Category.ACCOMMODATION.getValue());
accommodationPage.getContent(), pageable, accommodationPage.getTotalElements(), Category.ACCOMMODATION.getValue());

// ApiResponse로 반환
return ApiResponse.ok("관광지 목록을 성공적으로 조회했습니다.", customPage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,11 @@ public ApiResponse<CustomPage<SearchInformation>> getTourDataListByKeyword(Strin
Pageable pageable = PageRequest.of(page, size);

// 1. Restaurant 기준으로 페이징 처리된 데이터를 조회
Page<SearchInformation> cafePage = tourDataRepository.findByTitleContaining(keyword, pageable);
Page<SearchInformation> tourDataPage = tourDataRepository.findByTitleContaining(keyword, pageable);

// CustomPage 객체로 변환 (기존 페이지네이션 정보와 category를 함께 담음)
CustomPage<SearchInformation> customPage = new CustomPage<>(
cafePage.getContent(), pageable, cafePage.getTotalElements(), Category.TOURDATA.getValue());
tourDataPage.getContent(), pageable, tourDataPage.getTotalElements(), Category.TOURDATA.getValue());

// ApiResponse로 반환
return ApiResponse.ok("관광지 목록을 성공적으로 조회했습니다.", customPage);
Expand Down Expand Up @@ -663,11 +663,11 @@ public ApiResponse<Page<SimpleInformation>> retrieveAll(int page, int size) {
Pageable pageable = PageRequest.of(page, size);

// 1. Cafe 기준으로 페이징 처리된 데이터를 조회
Page<SimpleInformation> cafePage = tourDataRepository.findAllSimple(pageable);
Page<SimpleInformation> tourDataPage = tourDataRepository.findAllSimple(pageable);

// CustomPage 객체로 변환 (기존 페이지네이션 정보와 category를 함께 담음)
CustomPage<SimpleInformation> customPage = new CustomPage<>(
cafePage.getContent(), pageable, cafePage.getTotalElements(), Category.TOURDATA.getValue());
tourDataPage.getContent(), pageable, tourDataPage.getTotalElements(), Category.TOURDATA.getValue());

// ApiResponse로 반환
return ApiResponse.ok("관광지 목록을 성공적으로 조회했습니다.", customPage);
Expand Down

0 comments on commit 108794a

Please sign in to comment.