Skip to content

Commit

Permalink
[Merge] 2024-06-06 버전 수정 적용 (#214)
Browse files Browse the repository at this point in the history
* [Hotfix] 메인페이지 API 및 검색 API 오류 수정

---------

Signed-off-by: 이성훈 <[email protected]>
Signed-off-by: simjaeyoun <[email protected]>
Co-authored-by: simjaeyoun <[email protected]>
  • Loading branch information
seonghooni and Simy2 authored Jun 6, 2024
1 parent 4775e0b commit f32f6d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ResponseEntity<BookDto> getBookDetails(@RequestParam(name ="isbn") String
@GetMapping(value = "/list/middle")
public ResponseEntity<Page<BookDto>> getBookListByMiddleCategory(@RequestParam(name = "name") String middleCategoryName,
@RequestParam(name = "page") int page, @RequestParam(name = "size") int size) {
PageRequest pageRequest = PageRequest.of(page, size, Sort.by("count").descending());
PageRequest pageRequest = PageRequest.of(page, size, Sort.by("viewCount").descending());
Page<BookDto> result = bookService.getBookPageByMiddleCategory(middleCategoryName, pageRequest);

return ResponseEntity.ok(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class BookSearchController {
@GetMapping(params = {"title", "target=modal"})
public ResponseEntity<List<BookSearchResponseDto>> getBookListByTitleOnModal(@RequestParam(name = "title") String searchWord){

PageRequest pageRequest = PageRequest.of(0, 6, Sort.by("view-count").descending());
PageRequest pageRequest = PageRequest.of(0, 6, Sort.by("viewCount").descending());

List<BookSearchResponseDto> result = bookSearchService.searchBookOnModalByTitleContainingSearchWord(searchWord, pageRequest);

Expand All @@ -39,7 +39,7 @@ public ResponseEntity<List<BookSearchResponseDto>> getBookListByTitleOnModal(@Re
@GetMapping(params = {"author", "target=modal"})
public ResponseEntity<List<BookSearchResponseDto>> getBookListByAuthorOnModal(@RequestParam(name = "author") String searchWord){

PageRequest pageRequest = PageRequest.of(0, 6, Sort.by("view-count").descending());
PageRequest pageRequest = PageRequest.of(0, 6, Sort.by("viewCount").descending());

List<BookSearchResponseDto> result = bookSearchService.searchBookOnModalByAuthorContainingSearchWord(searchWord, pageRequest);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class Book {
private String publishingHouse; // 출판사명
private String publishYear; // 발행년도
private String content; // 책내용
private int reviewNum; // 리뷰 개수
private String mediaFlagNumber; // 미디어구분명
private String imageUrl; // 이미지 url
private int viewCount; // 조회된 횟수
Expand All @@ -51,14 +50,13 @@ public class Book {

@Builder
public Book(String isbn, String title, String author, String publishingHouse, String publishYear, String content,
int reviewNum, Categories bigCategory, Categories middleCategory, String imageUrl, int viewCount, int oneLineCount) {
Categories bigCategory, Categories middleCategory, String imageUrl, int viewCount, int oneLineCount) {
this.isbn = isbn;
this.title = title;
this.author = author;
this.publishingHouse = publishingHouse;
this.publishYear = publishYear;
this.content = content;
this.reviewNum = reviewNum;
this.bigCategory = bigCategory;
this.middleCategory = middleCategory;
this.imageUrl = imageUrl;
Expand Down

0 comments on commit f32f6d9

Please sign in to comment.