-
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: 이번주 과제 조회 API 구현 #647
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
21dcdd7
feat: 이번주 과제 조회 API 구현
AlmondBreez3 dc17536
feat: 불필요한 코드 제거 및 엔드포인트 수정
AlmondBreez3 f1d9c91
feat: 코드 오타 수정
AlmondBreez3 0fe4c06
fix: 레포지토리 메소드 위치 수정
AlmondBreez3 ed8f8d1
feat: 이번주까지 마감인 과제들 반환 로직 추가
AlmondBreez3 6513447
Merge branch 'develop' of https://github.com/GDSC-Hongik/gdsc-server …
AlmondBreez3 15c5bb7
feat: 도메인 메소드에 추가
AlmondBreez3 1b29a9a
feat: 도메인 메소드 주석 가독성 향상
AlmondBreez3 1c614a8
fix: 머지 컨플릭트 수정
AlmondBreez3 c71c2ff
fix: 머지 컨플릭트 해결
AlmondBreez3 7197c4a
feat: 과제 제출 내역이 null일때 고려해서 response반환
AlmondBreez3 36692d4
feat: 과제 제출 이력이 없을 때 StudyDetail에서 가져와서 반환
AlmondBreez3 f86e788
feat: 과제 응답 클래스명 변경
AlmondBreez3 d9fccc6
feat: 과제 응답 로직 개선
AlmondBreez3 497038a
feat: 과제 응답 Response 개선
AlmondBreez3 8b09f4f
feat: npe 예방 코드
AlmondBreez3 0ca5d97
fix: 머지 컨플릭트 해결
AlmondBreez3 1a50295
Merge branch 'develop' of https://github.com/GDSC-Hongik/gdsc-server …
AlmondBreez3 dc9d745
feat: merge develop
AlmondBreez3 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
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
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
54 changes: 54 additions & 0 deletions
54
...n/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.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,54 @@ | ||
package com.gdschongik.gdsc.domain.study.dto.response; | ||
|
||
import static com.gdschongik.gdsc.domain.study.domain.SubmissionFailureType.NOT_SUBMITTED; | ||
|
||
import com.gdschongik.gdsc.domain.study.domain.*; | ||
import com.gdschongik.gdsc.domain.study.domain.vo.Assignment; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.annotation.Nullable; | ||
import java.time.LocalDateTime; | ||
|
||
public record AssignmentHistoryStatusResponse( | ||
Long studyDetailId, | ||
@Schema(description = "과제 상태") StudyStatus assignmentStatus, | ||
@Schema(description = "주차") Long week, | ||
@Nullable @Schema(description = "과제 제목") String title, | ||
// TODO 추후 처리 예정 | ||
@Nullable @Schema(description = "과제 제출 상태") AssignmentSubmissionStatus assignmentSubmissionStatus, | ||
@Nullable @Schema(description = "과제 명세 링크") String descriptionLink, | ||
@Nullable @Schema(description = "마감 기한") LocalDateTime deadline, | ||
@Nullable @Schema(description = "과제 제출 링크") String submissionLink, | ||
@Nullable @Schema(description = "과제 제출 실패 사유. 제출 여부도 포함되어 있습니다. 미제출 상태라면 기본 과제 정보만 반환합니다.") | ||
SubmissionFailureType submissionFailureType, | ||
@Nullable @Schema(description = "최종 수정 일시") LocalDateTime committedAt) { | ||
|
||
// 과제 제출이 없는 경우, 과제 정보만 사용하여 AssignmentHistoryStatusResponse 생성 | ||
public static AssignmentHistoryStatusResponse of(StudyDetail studyDetail, AssignmentHistory assignmentHistory) { | ||
if (assignmentHistory == null) { | ||
return new AssignmentHistoryStatusResponse( | ||
studyDetail.getId(), | ||
studyDetail.getAssignment().getStatus(), | ||
studyDetail.getWeek(), | ||
studyDetail.getAssignment().getTitle(), | ||
null, | ||
studyDetail.getAssignment().getDescriptionLink(), | ||
studyDetail.getAssignment().getDeadline(), | ||
null, | ||
NOT_SUBMITTED, | ||
null); | ||
} | ||
|
||
Assignment assignment = studyDetail.getAssignment(); | ||
return new AssignmentHistoryStatusResponse( | ||
studyDetail.getId(), | ||
assignment.getStatus(), | ||
studyDetail.getWeek(), | ||
assignment.getTitle(), | ||
assignmentHistory.getSubmissionStatus(), | ||
assignment.getDescriptionLink(), | ||
assignment.getDeadline(), | ||
assignmentHistory.getSubmissionLink(), | ||
assignmentHistory.getSubmissionFailureType(), | ||
assignmentHistory.getCommittedAt()); | ||
} | ||
} |
Oops, something went wrong.
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.
필드 정의가 잘 되어 있습니다.
필드에 대한 API 문서화가 적절하게 이루어졌습니다. TODO 주석은 추후 작업을 나타냅니다.
추후 작업에 대한 도움이 필요하시면 말씀해 주세요. 관련 GitHub 이슈를 생성할 수 있습니다.