-
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 8 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
36 changes: 36 additions & 0 deletions
36
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.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,36 @@ | ||
package com.gdschongik.gdsc.domain.study.dto.response; | ||
|
||
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 AssignmentStatusResponse( | ||
Long studyDetailId, | ||
@Schema(description = "과제 상태") StudyStatus assignmentStatus, | ||
@Schema(description = "주차") Long week, | ||
@Nullable @Schema(description = "과제 제목") String title, | ||
// TODO 추후 처리 예정 | ||
@Nullable @Schema(description = "과제 제출 상태") AssignmentSubmissionStatus assignmentSubmissionStatus, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분은 #638 에서 처리할거라 todo만 달아주세요 |
||
@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) { | ||
public static AssignmentStatusResponse from(AssignmentHistory assignmentHistory) { | ||
StudyDetail studyDetail = assignmentHistory.getStudyDetail(); | ||
Assignment assignment = studyDetail.getAssignment(); | ||
return new AssignmentStatusResponse( | ||
studyDetail.getId(), | ||
assignment.getStatus(), | ||
studyDetail.getWeek(), | ||
assignment.getTitle(), | ||
assignmentHistory.getSubmissionStatus(), | ||
assignment.getDescriptionLink(), | ||
assignment.getDeadline(), | ||
assignmentHistory.getSubmissionLink(), | ||
assignmentHistory.getSubmissionFailureType(), | ||
assignmentHistory.getCommittedAt()); | ||
} | ||
} |
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.
이렇게 하면 아직 제출 시도를 하지 않은 Assignment는 AssignmentHistory가 없으므로 누락될 수 있을 것 같습니다.
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.
슬기님꺼 피알 머지 되면 처리할게영 그럼!