-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 스터디 주차별 출결번호 조회 #688
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
899d0b4
feat: 스터디 주차별 출결번호 조회
seulgi99 3d29b99
refactor: 리퀘스트 파라미터 변수명 수정
seulgi99 4a5f3d3
refactor: 스터디 출석일자 지났는지 판단 로직 추가
seulgi99 2c3f663
refactor: 출석일 지남 여부 판단 메소드명 변경
seulgi99 b1b3524
Merge branch 'develop' of https://github.com/GDSC-Hongik/gdsc-server …
seulgi99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
19 changes: 19 additions & 0 deletions
19
...ain/java/com/gdschongik/gdsc/domain/study/dto/response/StudyMentorAttendanceResponse.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,19 @@ | ||
package com.gdschongik.gdsc.domain.study.dto.response; | ||
|
||
import com.gdschongik.gdsc.domain.study.domain.StudyDetail; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.LocalDateTime; | ||
|
||
public record StudyMentorAttendanceResponse( | ||
Long studyDetailId, | ||
@Schema(description = "주차수") Long week, | ||
@Schema(description = "마감시각") LocalDateTime deadLine, | ||
@Schema(description = "출석번호") String attendanceNumber) { | ||
public static StudyMentorAttendanceResponse from(StudyDetail studyDetail) { | ||
return new StudyMentorAttendanceResponse( | ||
studyDetail.getId(), | ||
studyDetail.getWeek(), | ||
studyDetail.getAttendanceDay().atTime(23, 59, 59), | ||
studyDetail.getAttendanceNumber()); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외 처리 및 엣지 케이스를 고려하세요.
현재 메서드는 예외 처리나 엣지 케이스를 고려하지 않고 있습니다. 예를 들어,
studyDetailRepository.findAllByStudyIdOrderByWeekAsc(studyId)
가 빈 리스트를 반환할 경우를 처리하는 로직이 필요할 수 있습니다.다음과 같은 코드를 추가하여 예외 처리를 강화할 수 있습니다:
Committable suggestion