-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[STMT-273] 스터디 활동 목록 간략 조회 API 구현 (#130)
* 🩹 [STMT-261] 간략 활동 리스트 조회 api: ActivityListDetailedQuery를 클래스로 전환 및 생성 방법 수정 * ✨ [STMT-273] 조건에 따른 활동 간략 조회 메서드 구현 * ✨ [STMT-273] 미참여 상태의 활동에서 반환되는 null을 처리하기 위한 common status 클래스 구현 및 converter 수정 * ✨ [STMT-273] application layer: 페이지네이션과 페이지네이션을 적용하지 않는 메서드 구현 * ✨ [STMT-273] 활동 간략 목록을 조회하는 api 구현 * 🔥 [STMT-273] GlobalExceptionHandler 사용하지 않는 주석 제거 * ✨ [STMT-273] 요청된 카테고리가 없는 경우 각 활동 유형에 맞는 date between 기준을 반환하도록 구현 * ✨ [STMT-273] 차순위로 생성일자 내림차순으로 정렬 * ✅ [STMT-273] 테스트용 활동 더미데이터 추가 * ✨ [STMT-273] 요청에서 시작일이 종료일보다 이후일때 예외 처리 * 🥅 [STMT-273] page, size min 제약 추가 및 전역 예외처리 추가 * ✅ [STMT-273] 활동 간략 목록 API 테스트 케이스 작성 * 📝 [STMT-273] 스터디 활동 간략 목록 조회 API 명세서 작성 * 🎨 [STMT-273] 코드 포맷팅 * 🩹 [STMT-273] api 명세서 오탈자 수정 * 🩹 [STMT-273] 테스트 케이스 제목 말투 통일 * 🩹 [STMT-273] 테스트 포맷팅
- Loading branch information
Showing
25 changed files
with
1,101 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/stumeet/server/activity/adapter/in/response/ActivityListBriefResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.stumeet.server.activity.adapter.in.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import com.stumeet.server.activity.domain.model.ActivityStatus; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ActivityListBriefResponse( | ||
Long id, | ||
String category, | ||
String title, | ||
LocalDateTime startDate, | ||
LocalDateTime endDate, | ||
String location, | ||
ActivityStatus status, | ||
LocalDateTime createdAt | ||
) { | ||
@QueryProjection | ||
public ActivityListBriefResponse { | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...main/java/com/stumeet/server/activity/adapter/in/response/ActivityListBriefResponses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.stumeet.server.activity.adapter.in.response; | ||
|
||
import java.util.List; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ActivityListBriefResponses( | ||
List<ActivityListBriefResponse> items, | ||
PageInfoResponse pageInfo | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...java/com/stumeet/server/activity/adapter/out/persistence/JpaActivityRepositoryCustom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
package com.stumeet.server.activity.adapter.out.persistence; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
import com.stumeet.server.activity.adapter.in.response.ActivityListBriefResponse; | ||
import com.stumeet.server.activity.adapter.out.model.ActivityJpaEntity; | ||
import com.stumeet.server.activity.domain.model.ActivityCategory; | ||
|
||
public interface JpaActivityRepositoryCustom { | ||
Page<ActivityJpaEntity> findDetailPagesByCondition(Pageable pageable, Boolean isNotice, Long studyId, ActivityCategory category); | ||
|
||
Page<ActivityListBriefResponse> findBriefsByConditionWithPagination(Pageable pageable, Boolean isNotice, Long memberId, Long studyId, ActivityCategory category, LocalDateTime startDate, LocalDateTime endDate); | ||
|
||
List<ActivityListBriefResponse> findBriefsByCondition(Boolean isNotice, Long memberId, Long studyId, ActivityCategory category, LocalDateTime startDate, LocalDateTime endDate); | ||
} |
Oops, something went wrong.