Skip to content
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 19 commits into from
Aug 24, 2024

Conversation

AlmondBreez3
Copy link
Member

@AlmondBreez3 AlmondBreez3 commented Aug 18, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • 피그마에는 제출성공하면 글자수를 충족했다라는 키워드도 존재하던데 AssignmentHistory에 성공 이유라는 Status가 따로 없더라고요 제가 못찾는건가요?? 만약 그렇다면 혹시 어디 참고 하면 되는지 말씀해주시면 좋을 것 같습니다
    2024/08/23
  • assignmentHistoryRepository.findAssignmentHistoriesByStudentAndStudyId(currentMember, studyId);
    Study -> StudyId인것도 함께 처리하는 요청이 들어와서 같이 처리했다는 것 봐주세용
  • AssignmentStatusResponse위주로 봐주시면 될것같습니다
  • AssignmentHistory가 empty일경우에 response 구성을 다르게 하는 로직을 구현했습니다

📝 참고사항

📚 기타

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • 새로운 API 엔드포인트 추가: 사용자가 현재 주에 제출해야 할 과제 목록을 조회할 수 있게 됩니다.
    • 과제 상태를 포함하는 응답 형식을 제공하는 AssignmentHistoryStatusResponse 레코드가 도입되었습니다.
    • 과제 마감일이 이번 주인지 확인하는 기능 추가.
    • 과제 관리 기능 향상을 위해 마감일 확인 메서드 추가.
  • Bug Fixes

    • 과제 제출 상태를 올바르게 반환할 수 있도록 서비스 로직 개선.

@AlmondBreez3 AlmondBreez3 self-assigned this Aug 18, 2024
@AlmondBreez3 AlmondBreez3 requested a review from a team as a code owner August 18, 2024 13:33
Copy link

coderabbitai bot commented Aug 18, 2024

Caution

Review failed

The pull request is closed.

## Walkthrough

이번 변경 사항은 학생들이 이번 주에 제출해야 할 과제를 조회할 수 있는 새로운 API 엔드포인트를 `StudentStudyDetailController`에 추가합니다. 이로 인해 사용자는 과제 목록을 쉽게 확인할 수 있으며, 관련 메서드의 시그니처와 데이터 처리 방식도 개선되었습니다.

## Changes

| 파일 경로                                              | 변경 요약                                                        |
|-----------------------------------------------------|-----------------------------------------------------------------|
| `.../api/StudentStudyDetailController.java`, `.../application/StudentStudyDetailService.java` | 새로운 API 엔드포인트 추가 및 메서드 시그니처 변경            |
| `.../repository/AssignmentHistoryRepository.java`    | 메서드 이름 변경 및 새로운 메서드 추가                          |
| `.../domain/vo/Assignment.java`, `.../domain/StudyDetail.java`, `.../dto/response/AssignmentHistoryStatusResponse.java` | 과제 상태 응답을 위한 새로운 객체 정의 및 메서드 추가           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant Controller
    participant Service
    participant Repository

    User->>Controller: GET /upcoming-assignments?studyId={studyId}
    Controller->>Service: getUpcomingAssignments(studyId)
    Service->>Repository: findAssignmentHistoriesByStudentAndStudyId(currentMember, studyId)
    Repository-->>Service: Return assignment histories
    Service-->>Controller: Return list of AssignmentHistoryStatusResponse
    Controller-->>User: Respond with assignments

Assessment against linked issues

Objective Addressed Explanation
이번주 과제 조회하기 API 구현 (#631)
마지막으로 제출한 과제 정보 조회 기능 (#631) 해당 기능은 구현되지 않았음.

🐰 새로운 API로 과제를 확인해요,
주의 깊게 마감일을 챙기죠.
학생들은 이제 더 이상 걱정 없어요,
Rabbit은 항상 도와줄 준비가 되어 있죠! 🐇✨


<!-- walkthrough_end --><!-- commit_ids_reviewed_start -->

<!-- 21dcdd7a1ff95450fc9c903b9b9971aac5eb8764 -->
<!-- dc175366f2c0e852f84fcf91ad5734a24f1ef50b -->
<!-- f1d9c919c30d3e608ade03201ba71d9386608b5a -->
<!-- 0fe4c064271300fcc4e3430d8d2655295fb2d03f -->
<!-- 15c5bb71f608fd2035e3733b95b201890c7ef8be -->
<!-- 1b29a9a7423741998f4c233f81399f69460322c6 -->
<!-- 1c614a8dd48ae89d70d05ca91226dc0c09b9ffff -->
<!-- c71c2ff38663006afb3686b8b4048278e0f476d5 -->
<!-- 7197c4af431cbd61d2a9c8bfa48a043c015b2d15 -->
<!-- 36692d43d99ba4de3af053d672fea6d60d727477 -->
<!-- f86e78804c1c0ce77f47864a18fcfed49e6e0a83 -->
<!-- 497038a5af684eb03cbea542551859fd10961c62 -->
<!-- 8b09f4f1c9d5017a743705efdaa0a1f36e43fcdd -->
<!-- 0ca5d970b21871202fe4ee66332fb60dd791955d -->

<!-- commit_ids_reviewed_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->

<!--

src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java: ## AI-generated summary of changes

The diff introduces a new API endpoint in the StudentStudyDetailController class, enhancing the application's functionality by allowing users to retrieve a list of upcoming assignments due within the current week. This is accomplished through the addition of the getUpcomingAssignments method, which is annotated with @Operation for API documentation and @GetMapping to map HTTP GET requests to the new endpoint. The method accepts a studyId as a request parameter and returns a ResponseEntity containing a list of AssignmentHistoryStatusResponse objects. This change expands the controller's capabilities, facilitating improved tracking of assignment deadlines for students. Additionally, the existing method getStudySessions has been renamed to getUpcomingAssignments, reflecting this new functionality.

Alterations to the declarations of exported or public entities

  • public ResponseEntity<List<StudyStudentSessionResponse>> getStudySessions(Long studyId) in class StudentStudyDetailController in src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.javapublic ResponseEntity<List<AssignmentHistoryStatusResponse>> getUpcomingAssignments(Long studyId) in class StudentStudyDetailController in src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java

src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java: ## AI-generated summary of changes

The changes in the StudentStudyDetailService.java file introduce a new public method, getUpcomingAssignments, which retrieves a list of assignments due within the current week for a specified study. This method is annotated with @Transactional(readOnly = true), indicating its read-only nature. It begins by obtaining the current member using memberUtil.getCurrentMember(). The method queries the assignmentHistoryRepository to find assignment histories linked to the current member and the provided study ID, filtering results to include only those assignments where the deadline is within the current week. The filtered AssignmentHistory objects are then mapped to AssignmentHistoryStatusResponse objects, which are returned as a list. Additionally, the existing methods getSubmittableAssignments, getStudyTodoList, and getStudySessions have been modified to change the repository method calls from findAssignmentHistoriesByStudentAndStudy to findAssignmentHistoriesByStudentAndStudyId, aligning with the new naming convention. This change enhances clarity and consistency in the method's functionality.

These modifications improve the service's functionality by allowing clients to access the status of upcoming assignments while ensuring a consistent approach to fetching assignment histories.

Alterations to the declarations of exported or public entities

  • public AssignmentDashboardResponse getSubmittableAssignments(Long studyId) in class StudentStudyDetailService in src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.javapublic List<AssignmentHistoryStatusResponse> getUpcomingAssignments(Long studyId) in class StudentStudyDetailService in src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java
  • public List<AssignmentHistory> findAssignmentHistoriesByStudentAndStudy(Long student, Long study) in class AssignmentHistoryRepository in src/main/java/com/gdschongik/gdsc/domain/study/repository/AssignmentHistoryRepository.javapublic List<AssignmentHistory> findAssignmentHistoriesByStudentAndStudyId(Long student, Long study) in class AssignmentHistoryRepository in src/main/java/com/gdschongik/gdsc/domain/study/repository/AssignmentHistoryRepository.java

src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java: ## AI-generated summary of changes

The diff introduces a new method isDeadLineThisWeek() to the Assignment class in the Assignment.java file. This method checks if the assignment's deadline falls within the current week by comparing the deadline's date with the start and end of the week. It utilizes the LocalDate class to obtain the current date and derive the start (Monday) and end (Sunday) of the week. The method returns a boolean indicating whether the deadline is within this range, thereby enhancing the functionality of the Assignment class for users needing to assess upcoming deadlines within the week.

Alterations to the declarations of exported or public entities

  • public boolean isDeadLineThisWeek() in class Assignment in src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java → new method added

src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.java: ## AI-generated summary of changes

The diff introduces a new public method isAssignmentDeadlineThisWeek() in the StudyDetail class, which checks whether the assignment's deadline is within the current week. This addition enhances the functionality of the class by providing a more specific assessment of assignment deadlines, complementing the existing method isAssignmentDeadlineRemaining(). The new method focuses on improving assignment management features, allowing users to determine not only if a deadline is still pending but also if it is approaching within the current week.

Alterations to the declarations of exported or public entities

  • public boolean isAssignmentDeadlineRemaining() in class StudyDetail in src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.javapublic boolean isAssignmentDeadlineRemaining() in class StudyDetail in src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.java
  • public boolean isAssignmentDeadlineThisWeek() in class StudyDetail in src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.java (new method added)

src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java: ## AI-generated summary of changes

The newly introduced file AssignmentHistoryStatusResponse.java defines a record that encapsulates the response structure for assignment history status in a study context. This record includes several fields such as studyDetailId, assignmentStatus, week, title, assignmentSubmissionStatus, descriptionLink, deadline, submissionLink, and submissionFailureType, which collectively represent the state and metadata of an assignment. The use of @Schema annotations enhances the documentation of the API, providing descriptions for each field that clarify their purpose. The record includes a static factory method of(StudyDetail studyDetail, AssignmentHistory assignmentHistory), which constructs an AssignmentHistoryStatusResponse instance using either a StudyDetail object or an AssignmentHistory object. If the assignmentHistory is null, the method populates the response using data from studyDetail, setting the assignmentSubmissionStatus to null and indicating a submission failure type of NOT_SUBMITTED. Overall, this file enhances the domain model by providing a structured way to represent assignment history responses, facilitating better data handling and API responses in the context of educational studies.

Alterations to the declarations of exported or public entities

  • public record AssignmentHistoryStatusResponse(Long studyDetailId, StudyStatus assignmentStatus, Long week, @Nullable String title, @Nullable AssignmentSubmissionStatus assignmentSubmissionStatus, @Nullable String descriptionLink, @Nullable LocalDateTime deadline, @Nullable String submissionLink, @Nullable SubmissionFailureType submissionFailureType, @Nullable LocalDateTime committedAt) in src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.javapublic record AssignmentHistoryStatusResponse(Long studyDetailId, StudyStatus assignmentStatus, Long week, @Nullable String title, @Nullable AssignmentSubmissionStatus assignmentSubmissionStatus, @Nullable String descriptionLink, @Nullable LocalDateTime deadline, @Nullable String submissionLink, @Nullable SubmissionFailureType submissionFailureType, @Nullable LocalDateTime committedAt) in src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java
  • public static AssignmentHistoryStatusResponse of(StudyDetail studyDetail, AssignmentHistory assignmentHistory) in src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.javapublic static AssignmentHistoryStatusResponse of(StudyDetail studyDetail, AssignmentHistory assignmentHistory) in src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java

-->

<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: pr objectives by coderabbit.ai -->

<!--

## PR Summary

The pull request titled "feat: 이번주 과제 조회 API 구현" was submitted by user AlmondBreez3 and focuses on implementing an API for retrieving assignments for the current week. This feature aims to enhance the user experience by allowing students to access information about their most recently submitted assignments. The PR addresses issue #631, which seeks to provide functionality for viewing assignment data from a student's perspective.

In the description, the author notes that the Figma design includes a keyword for successful submission based on character count but mentions the absence of a specific status for successful submissions in the `AssignmentHistory`. They request clarification on whether this status exists and where to find it in the codebase. Additionally, the author indicates that the API will handle requests for multiple assignments, as confirmed by a colleague, and has implemented logic to structure responses differently when the `AssignmentHistory` is empty, focusing on the `AssignmentStatusResponse`.

## Objectives from Linked Issues

The linked issue #631, titled "✨ 이번주 과제 조회하기 API," outlines the goal of creating an API that enables students to view their assignments for the current week. The primary objective is to allow students to retrieve information about their most recently submitted assignments, thereby improving their ability to track and manage their coursework effectively. This feature is designed from the student perspective, ensuring that the API provides relevant and timely data regarding assignments. The implementation of this API is expected to streamline the assignment management process for students, making it easier for them to stay informed about their submissions and deadlines.

-->

<!-- end of auto-generated comment: pr objectives by coderabbit.ai --><!-- tips_start -->

---



Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

<details>
<summary>Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
	- `I pushed a fix in commit <commit_id>.`
	- `Generate unit testing code for this file.`
	- `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
	- `@coderabbitai generate unit testing code for this file.`
	-	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
	- `@coderabbitai generate interesting stats about this repository and render them as a table.`
	- `@coderabbitai show all the console.log statements in this repository.`
	- `@coderabbitai read src/utils.ts and generate unit testing code.`
	- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
	- `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (invoked as PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.


Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e242f91 and 21dcdd7.

Files selected for processing (3)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java (1 hunks)
Additional comments not posted (5)
src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2)

5-5: 잘하셨습니다! 새로운 클래스 임포트.

AssignmentStatusResponse 클래스가 올바르게 임포트되었습니다.


32-38: 새로운 API 엔드포인트 구현 확인.

새로운 getAssignmentsToSubmit 메서드가 올바르게 추가되었습니다. API 문서화 및 요청 매핑이 적절하게 설정되어 있습니다.

src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java (1)

1-37: 새로운 레코드 클래스 정의 확인.

AssignmentStatusResponse 레코드가 잘 정의되었습니다. 각 필드에 대해 적절한 주석이 추가되어 있으며, from 메서드를 통해 AssignmentHistory 객체를 변환하는 로직도 명확합니다.

src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (2)

9-9: 잘하셨습니다! 새로운 클래스 임포트.

AssignmentStatusResponse 클래스가 올바르게 임포트되었습니다.


45-55: 새로운 메서드 getAssignmentsToSubmit 구현 확인.

새로운 메서드가 올바르게 구현되었습니다. @Transactional(readOnly = true) 어노테이션을 통해 읽기 전용 트랜잭션으로 설정되어 있으며, 필터링 및 매핑 로직이 명확합니다.

@@ -26,4 +28,12 @@ public ResponseEntity<AssignmentDashboardResponse> getSubmittableAssignments(
AssignmentDashboardResponse response = studentStudyDetailService.getSubmittableAssignments(studyId);
return ResponseEntity.ok(response);
}

@Operation(summary = "이번주 제출해야 할 과제 조회", description = "마감 기한이 이번주까지인 과제를 조회합니다.")
@GetMapping("/assignments")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체 과제를 조회하는게 아니라서 추가 컨텍스트가 있으면 좋을듯 합니다

@Schema(description = "과제 상태") StudyStatus assignmentStatus,
@Schema(description = "주차") Long week,
@Nullable @Schema(description = "과제 제목") String title,
@Nullable @Schema(description = "과제 제출 상태") AssignmentSubmissionStatus assignmentSubmissionStatus,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 #638 에서 처리할거라 todo만 달아주세요

assignment.getDescriptionLink(),
assignment.getDeadline(),
assignmentHistory.getSubmissionLink(),
assignmentHistory.getSubmissionFailureType() == null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경 후에는 항상 null이 아니기 때문에 null 체크 안해도 됩니다

assignmentHistory.getSubmissionFailureType() == null
? null
: assignmentHistory.getSubmissionFailureType(),
assignmentHistory.getCommittedAt() == null ? null : assignmentHistory.getCommittedAt());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 무슨 의미인가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최종 수정 일시가 필요한 것으로 보여 구현해놓았는데...필요가 없나요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위의 것도 지금봤는데 삼항 연산자를 쓸 이유가 있나요?
assignmentHistory.getCommittedAt() 와 동일한 코드 같습니다.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 21dcdd7 and dc17536.

Files selected for processing (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java

public List<AssignmentStatusResponse> getAssignmentsToSubmit(Long studyId) {
Member currentMember = memberUtil.getCurrentMember();
List<AssignmentHistory> assignmentHistories =
assignmentHistoryRepository.findAssignmentHistoriesByMenteeAndStudy(currentMember, studyId).stream()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assignmentHistoryRepository.findAssignmentHistoriesByMenteeAndStudy(currentMember, studyId).stream()
assignmentHistoryRepository.findAssignmentHistoriesByMenteeAndStudyId(currentMember, studyId).stream()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

study를 따로 호출해야하는데 굳이지 않나용?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인자로 StudyId를 받고 있으니, 메서드명이 Study로 끝나는게 아니라 StudyId로 끝나야 한다는 의미입니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 죄송해요 잘못봤네요

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dc17536 and f1d9c91.

Files selected for processing (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryRepository.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java
Additional comments not posted (1)
src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryRepository.java (1)

14-14: 새로운 메서드 추가 확인

findAssignmentHistoriesByMenteeAndStudyId 메서드는 MemberstudyId를 기반으로 여러 AssignmentHistory 객체를 반환하도록 설계되었습니다. 메서드 이름이 명확하고 Java 명명 규칙을 따르고 있습니다. 메서드 시그니처가 적절하며, 여러 결과를 반환하기 위해 List<AssignmentHistory>를 사용하는 것이 적절합니다.

그러나 이 메서드의 구현이 예상대로 작동하는지 확인하는 것이 좋습니다. 이 메서드를 호출하는 코드가 올바르게 작동하는지 검증하십시오.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f1d9c91 and 0fe4c06.

Files selected for processing (4)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyHistoryService.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryCustomRepository.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryCustomRepositoryImpl.java (1 hunks)
Files skipped from review due to trivial changes (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryCustomRepository.java
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/AssignmentHistoryCustomRepositoryImpl.java
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java
Additional comments not posted (1)
src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyHistoryService.java (1)

77-77: 리포지토리 메서드 호출 변경 확인

findAssignmentHistoriesByMenteeAndStudyId 메서드 호출로 변경되었습니다. 이 변경은 studyId를 사용하여 과제 이력을 조회하는 것으로 보입니다. 리포지토리 메서드가 올바르게 구현되었는지 확인하고, 예상되는 동작과 일치하는지 검증해 주세요. 또한, 이 변경이 다른 부분에 영향을 미치지 않는지 확인하는 것이 중요합니다.

Verification successful

리포지토리 메서드 구현 확인 완료

findAssignmentHistoriesByMenteeAndStudyId 메서드는 AssignmentHistoryCustomRepositoryImpl.java에 구현되어 있으며, AssignmentHistoryCustomRepository.java에 선언되어 있습니다. 이 메서드는 StudentStudyDetailService.javaStudentStudyHistoryService.java에서 사용되고 있어, 올바르게 구현된 것으로 보입니다. 이 변경이 다른 부분에 영향을 미치지 않는지 추가로 확인해 주세요.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of `findAssignmentHistoriesByMenteeAndStudyId` in the repository.

# Test: Search for the method definition. Expect: Correct implementation using `studyId`.
ast-grep --lang java --pattern $'public List<AssignmentHistory> findAssignmentHistoriesByMenteeAndStudyId(Member mentee, Long studyId) {
  $$$
}'

Length of output: 146


Script:

#!/bin/bash
# Description: Search for the method name `findAssignmentHistoriesByMenteeAndStudyId` in the repository to verify its existence and implementation.

# Test: Use ripgrep to find occurrences of the method name.
rg 'findAssignmentHistoriesByMenteeAndStudyId'

Length of output: 1064


@Operation(summary = "이번주 제출해야 할 과제 조회", description = "마감 기한이 이번주까지인 과제를 조회합니다.")
@GetMapping("/assignments/upcoming")
public ResponseEntity<List<AssignmentStatusResponse>> getAssignmentsToSubmit(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoint랑 비슷한 느낌으로 가면 어떨까요

Suggested change
public ResponseEntity<List<AssignmentStatusResponse>> getAssignmentsToSubmit(
public ResponseEntity<List<AssignmentStatusResponse>> getUpcomingAssignments(

List<AssignmentHistory> assignmentHistories =
assignmentHistoryRepository.findAssignmentHistoriesByMenteeAndStudyId(currentMember, studyId).stream()
.filter(assignmentHistory ->
assignmentHistory.getStudyDetail().isAssignmentDeadlineRemaining())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api summary는 이번주 제출해야 할 과제 조회인데, 이번주라는 조건이 보이지 않습니다.
조건을 수정 혹은 api 설명을 수정해주셔야 할 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조건 추가하겠습니다

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0fe4c06 and 15c5bb7.

Files selected for processing (5)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyHistoryService.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyHistoryService.java
Additional comments not posted (4)
src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (1)

32-38: API 엔드포인트 설명 및 메서드명 일치

메서드 getUpcomingAssignments는 이번 주 제출해야 할 과제를 조회하는 기능을 제공합니다. 메서드명과 API 설명이 일치하는지 확인하세요. 기존 리뷰에서 제안된 메서드명 변경이 반영되었는지 검토해보세요.

src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (1)

45-55: 이번 주 과제 필터링 로직 확인

메서드 getUpcomingAssignments는 이번 주 마감인 과제를 필터링합니다. isAssignmentDeadlineThisWeek 메서드를 사용하여 올바르게 필터링되고 있는지 확인하세요. 기존 리뷰에서 언급된 조건 추가가 반영되었는지 검토해보세요.

src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java (1)

97-107: 이번 주 마감일 확인 로직 검토

메서드 isDeadLineThisWeek는 마감일이 이번 주 내에 있는지 확인합니다. LocalDate를 사용하여 주의 시작과 끝을 계산하는 로직이 올바른지 검토하세요. 이 로직이 주말을 포함하여 올바르게 작동하는지 확인하는 것이 중요합니다.

src/main/java/com/gdschongik/gdsc/domain/study/domain/StudyDetail.java (1)

97-99: 과제 마감일 이번 주 확인 로직 검토

메서드 isAssignmentDeadlineThisWeek는 과제의 마감일이 이번 주 내에 있는지 확인합니다. Assignment 클래스의 isDeadLineThisWeek 메서드를 호출하여 올바르게 작동하는지 검토하세요. 이 메서드가 정확한 결과를 반환하는지 테스트 케이스를 통해 확인하는 것이 좋습니다.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 15c5bb7 and 1b29a9a.

Files selected for processing (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java

Comment on lines 48 to 52
List<AssignmentHistory> assignmentHistories =
assignmentHistoryRepository.findAssignmentHistoriesByMenteeAndStudyId(currentMember, studyId).stream()
.filter(assignmentHistory ->
assignmentHistory.getStudyDetail().isAssignmentDeadlineThisWeek())
.toList();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 하면 아직 제출 시도를 하지 않은 Assignment는 AssignmentHistory가 없으므로 누락될 수 있을 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

슬기님꺼 피알 머지 되면 처리할게영 그럼!

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c71c2ff and 7197c4a.

Files selected for processing (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java

Comment on lines 58 to 62
List<AssignmentHistory> assignmentHistories =
assignmentHistoryRepository.findAssignmentHistoriesByStudentAndStudyId(currentMember, studyId).stream()
.filter(assignmentHistory ->
assignmentHistory.getStudyDetail().isAssignmentDeadlineThisWeek())
.toList();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제출한 이력이 없는 과제에 대해서는 AssignmentHistory가 존재하지 않습니다.
따라서, 이 방법으로는 제출한 적 있는 과제에 대해서만 조회가 가능합니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response한번 보시겠어요??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 이해했습니다~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 이해했어용

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

근데 질문이 있는데 수강신청하면 자동으로 저 assignmentHistory가 생기는게 아닌가요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StudentStudyHistoryService의 findOrCreate 메서드 확인해주세요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그런데 상욱님 제가 만든 Response를 보시면 null이면 Assignment를 반환하게 만들었는데 이걸로 충분한거 같은데 왜 다른 로직이 필요하다고 생각하신지 여쭈어봐도 될까용

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어 아니에요!! 무시하셔두 됩니다 제가 오늘 밤에 퇴근하고 고칠게요

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7197c4a and 36692d4.

Files selected for processing (3)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dao/StudyDetailRepository.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentStatusResponse.java
Additional comments not posted (1)
src/main/java/com/gdschongik/gdsc/domain/study/dao/StudyDetailRepository.java (1)

11-11: 새로운 메서드 추가가 적절합니다.

findAllByStudyId 메서드는 StudyDetail 객체를 정렬 없이 검색할 수 있는 기능을 제공하여 데이터 접근의 유연성을 높입니다.

이 메서드가 코드베이스에서 올바르게 사용되고 있는지 확인하세요.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (1)

33-39: 메서드 이름 및 엔드포인트 경로 개선 제안

현재 메서드 이름과 엔드포인트 경로가 기능을 충분히 설명하지 못할 수 있습니다. 더 명확한 설명을 위해 다음과 같이 변경하는 것을 고려해보세요:

@GetMapping("/assignments/this-week")
public ResponseEntity<List<AssignmentHistoryStatusResponse>> getAssignmentsDueThisWeek(

이렇게 하면 API 사용자가 이번 주에 제출해야 할 과제를 조회하는 것임을 더 쉽게 이해할 수 있습니다.

src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (1)

11-23: @Nullable 사용 적절성 및 TODO 주석

@Nullable 어노테이션이 적절하게 사용되었습니다. 또한 TODO 주석이 있으니 추후에 처리해야 할 작업을 잊지 않도록 주의하세요.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 36692d4 and f86e788.

Files selected for processing (3)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (1 hunks)
Additional comments not posted (3)
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (1)

24-54: 필드 매핑 로직 확인

fromfromStudyDetail 메서드의 필드 매핑 로직이 올바르게 구현되었습니다. 모든 필요한 필드가 적절히 매핑되었으며, 필드가 null일 수 있는 경우를 고려한 점이 좋습니다.

src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (2)

45-45: 리포지토리 메서드 이름 명확성

리포지토리 메서드 이름이 findAssignmentHistoriesByStudentAndStudyId로 변경되어 명확성이 향상되었습니다. 이로 인해 코드의 가독성이 개선되었습니다.


55-75: 필터링 로직 및 에지 케이스 처리 확인

getUpcomingAssignments 메서드가 이번 주에 마감되는 과제를 올바르게 필터링하고, 제출 이력이 없는 경우를 적절히 처리하고 있습니다. 이러한 로직은 기능의 신뢰성을 높입니다.

Copy link
Member

@uwoobeat uwoobeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f86e788 and 497038a.

Files selected for processing (3)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java
  • src/main/java/com/gdschongik/gdsc/domain/study/domain/vo/Assignment.java
Additional comments not posted (2)
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (2)

1-10: 적절한 import 문 사용

import 문이 클래스의 기능에 적절하게 사용되었습니다.


25-53: 정적 팩토리 메서드 구현이 적절합니다.

assignmentHistory의 존재 여부에 따라 AssignmentHistoryStatusResponse를 올바르게 생성합니다. 논리가 명확하며 null 케이스를 효과적으로 처리합니다.

Comment on lines +11 to +23
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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필드 정의가 잘 되어 있습니다.

필드에 대한 API 문서화가 적절하게 이루어졌습니다. TODO 주석은 추후 작업을 나타냅니다.

추후 작업에 대한 도움이 필요하시면 말씀해 주세요. 관련 GitHub 이슈를 생성할 수 있습니다.

Copy link
Contributor

@seulgi99 seulgi99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

public List<AssignmentHistoryStatusResponse> getUpcomingAssignments(Long studyId) {
Member currentMember = memberUtil.getCurrentMember();
List<StudyDetail> studyDetails = studyDetailRepository.findAllByStudyId(studyId).stream()
.filter(studyDetail -> studyDetail.isAssignmentDeadlineThisWeek())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 아마 한번 돌려보시면 assignment.deadline이 null인 경우에 익셉션 던져질거에요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 구현하신 isOpen가져와서 비교하는 대로 수정했습니다

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 497038a and 8b09f4f.

Files selected for processing (1)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3 hunks)
Additional comments not posted (3)
src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3)

42-42: 리포지토리 메서드 이름 확인 필요

리포지토리 메서드 이름이 findAssignmentHistoriesByStudentAndStudyId로 변경되었습니다. 이 이름이 일관성 있는지 확인해주세요.


57-74: 빈 과제 목록 처리 확인

이번 주에 마감 기한이 있는 과제가 없을 경우, 이 메서드가 빈 목록을 올바르게 처리하는지 확인해주세요.


81-81: 리포지토리 메서드의 적절성 확인

getStudySessionsgetSubmittableAssignments에서 동일한 리포지토리 메서드를 사용하고 있습니다. 두 경우 모두에 적합한지 확인해주세요.

Copy link
Member

@Sangwook02 Sangwook02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8b09f4f and 0ca5d97.

Files selected for processing (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (4 hunks)
Additional comments not posted (6)
src/main/java/com/gdschongik/gdsc/domain/study/api/StudentStudyDetailController.java (3)

Line range hint 17-22: 코드 변경 사항이 적절합니다.

getSubmittableAssignments 메서드는 올바르게 구현되었습니다.


Line range hint 28-33: 코드 변경 사항이 적절합니다.

getStudySessions 메서드는 올바르게 구현되었습니다.


42-48: 코드 변경 사항이 적절합니다.

getUpcomingAssignments 메서드는 올바르게 구현되었습니다.

src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyDetailService.java (3)

Line range hint 36-54: 코드 변경 사항이 적절합니다.

getSubmittableAssignments 메서드는 올바르게 구현되었습니다.


Line range hint 56-74: 코드 변경 사항이 적절합니다.

getStudySessions 메서드는 올바르게 구현되었습니다.


88-105: 코드 변경 사항이 적절합니다.

getUpcomingAssignments 메서드는 올바르게 구현되었습니다.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

@AlmondBreez3 AlmondBreez3 merged commit 9baf58c into develop Aug 24, 2024
1 check passed
@AlmondBreez3 AlmondBreez3 deleted the feature/631-student-get-assignment branch August 25, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ 이번주 과제 조회하기 API
4 participants