Skip to content

Commit 802c506

Browse files
committed
Merge branch 'develop' into deploy
2 parents 1cad127 + c3d3db1 commit 802c506

File tree

4 files changed

+131
-6
lines changed

4 files changed

+131
-6
lines changed

.idea/workspace.xml

Lines changed: 122 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bookduck/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ bin/
1818
!**/src/test/**/bin/
1919

2020
### IntelliJ IDEA ###
21-
.idea
21+
.idea/
22+
.idea/*
23+
!.idea/codeStyles/
24+
!.idea/inspectionProfiles/
2225
*.iws
2326
*.iml
2427
*.ipr

bookduck/src/main/java/com/mmc/bookduck/domain/club/controller/ClubController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public ResponseEntity<Long> createClub(@Valid @RequestBody ClubCreateRequestDto
4444
@Operation(summary = "최근 모집 중인 클럽 보기", description = "최근 생성된, 모집 중인 클럽을 표시합니다.")
4545
@GetMapping("/new")
4646
public ResponseEntity<ClubSearchListResponseDto> findRecentActiveClubs(
47-
@RequestParam(defaultValue = "latest") String sort,
47+
@RequestParam(value = "orderBy", defaultValue = "latest") String orderBy,
4848
@PageableDefault(size = 10) Pageable pageable) {
49-
return ResponseEntity.ok(clubService.findRecentActiveClubs(pageable, sort));
49+
return ResponseEntity.ok(clubService.findRecentActiveClubs(pageable, orderBy));
5050
}
5151

5252
@Operation(summary = "클럽 검색", description = "클럽명, 책 제목, 저자명으로 클럽을 검색합니다. 정렬 기준: 정확도순 > 가입인원순 > 최근생성순 > 곧종료순")

bookduck/src/main/java/com/mmc/bookduck/domain/club/service/ClubService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ public LocalDateTime getLastReadAt(ClubMember clubMember) {
356356
}
357357

358358
@Transactional(readOnly = true)
359-
public ClubSearchListResponseDto findRecentActiveClubs(Pageable pageable, String sort) {
359+
public ClubSearchListResponseDto findRecentActiveClubs(Pageable pageable, String orderBy) {
360360
Page<Club> clubPage;
361361

362-
if (!"latest".equalsIgnoreCase(sort) && !"popular".equalsIgnoreCase(sort)) {
362+
if (!"latest".equalsIgnoreCase(orderBy) && !"popular".equalsIgnoreCase(orderBy)) {
363363
throw new CustomException(ErrorCode.INVALID_SORT_PARAMETER);
364364
}
365-
if ("popular".equalsIgnoreCase(sort)) {
365+
if ("popular".equalsIgnoreCase(orderBy)) {
366366
// 인기순: 정원 마감률 높은 순 + 최신순
367367
clubPage = clubRepository.findByClubStatusOrderByPopularityDesc(ClubStatus.ACTIVE, pageable);
368368
} else {

0 commit comments

Comments
 (0)