Skip to content

Commit ce94a4a

Browse files
authored
feat #ENG-955 userId를 통한 맴버에 따라 참여하고 있는 모임들을 조회할 수 있는 api 구현 (#755)
* refactor: 메서드명 수정 * refactor: api 스키마 추가
1 parent 84c8b88 commit ce94a4a

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

main/src/main/java/org/sopt/makers/crew/main/internal/InternalMeetingController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public ResponseEntity<InternalMeetingGetAllWritingPostResponseDto> getMeetingsFo
4343
public ResponseEntity<InternalUserAppliedMeetingResponseDto> getAppliedMeetingInfo(
4444
@RequestParam @Valid Integer userId) {
4545
return ResponseEntity.ok().body(
46-
InternalUserAppliedMeetingResponseDto.from(internalMeetingService.getAppliedMeetingInfo(userId)));
46+
InternalUserAppliedMeetingResponseDto.from(internalMeetingService.retrieveAppliedMeetingInfo(userId)));
4747
}
4848
}

main/src/main/java/org/sopt/makers/crew/main/internal/dto/UserAppliedMeetingDto.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@
22

33
import java.time.LocalDateTime;
44

5-
public record UserAppliedMeetingDto(String meetingCategory, String meetingTitle,
6-
LocalDateTime mStartTime, LocalDateTime mEndTime, Boolean isLeader, String imgUrl) {
5+
import io.swagger.v3.oas.annotations.media.Schema;
6+
7+
public record UserAppliedMeetingDto(
8+
@Schema(description = "모임 분류, [스터디 or 행사 or 세미나 or 번쩍 or 강연]", example = "스터디")
9+
String meetingCategory,
10+
@Schema(description = "모임 제목", example = "오늘 21시 강남 스터디")
11+
String meetingTitle,
12+
@Schema(description = "모임 시작 기간")
13+
LocalDateTime mStartTime,
14+
@Schema(description = "모임 종료 기간")
15+
LocalDateTime mEndTime,
16+
@Schema(description = "스장 여부 (공동 스장도 true입니다)")
17+
Boolean isLeader,
18+
@Schema(description = "모임 이미지 url")
19+
String imgUrl) {
720

821
public static UserAppliedMeetingDto of(
922
String meetingCategory, String meetingTitle,

main/src/main/java/org/sopt/makers/crew/main/internal/service/InternalMeetingService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public InternalMeetingGetAllWritingPostResponseDto getMeetingsForWritingPost(Pag
9898
return InternalMeetingGetAllWritingPostResponseDto.from(meetings, pageMetaDto);
9999
}
100100

101-
public List<UserAppliedMeetingDto> getAppliedMeetingInfo(Integer userId) {
101+
public List<UserAppliedMeetingDto> retrieveAppliedMeetingInfo(Integer userId) {
102102

103103
List<Meeting> myMeetings = meetingRepository.findAllByUserId(userId);
104104
List<Apply> allByUserIdAndStatus = applyRepository.findAllByUserIdAndStatus(userId, EnApplyStatus.APPROVE);

0 commit comments

Comments
 (0)