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

refactor: 스터디 개강일 전에도 내 수강중인 스터디 조회 API에서 선별할 수 있도록 수정 #694

Merged

Conversation

Sangwook02
Copy link
Member

@Sangwook02 Sangwook02 commented Aug 27, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • 개강일이 스터디 신청기간과 별개이므로 개강전에는 수강중인 스터디 조회 API가 수강중인 스터디를 null로 반환하고 있습니다.
    이를 방지하기 위해 필터링 조건을 신청 시작일~종강일로 변경했습니다.
  • 핵심 로직은 아닌 것 같아서 별도 메서드 분리는 하지 않았습니다.

📝 참고사항

📚 기타

Summary by CodeRabbit

  • 새로운 기능

    • 현재 진행 중인 스터디를 보다 정확하게 필터링하는 기능 개선.
    • 스터디의 신청 기간에 따라 진행 중인 스터디를 확인할 수 있도록 로직 업데이트.
  • 버그 수정

    • 스터디의 시작 및 종료 날짜를 기준으로 진행 중인 스터디를 올바르게 판별하도록 수정.

@Sangwook02 Sangwook02 added the ♻️ refactor 기능 개선 label Aug 27, 2024
@Sangwook02 Sangwook02 self-assigned this Aug 27, 2024
@Sangwook02 Sangwook02 requested a review from a team as a code owner August 27, 2024 11:03
Copy link

coderabbitai bot commented Aug 27, 2024

Walkthrough

변경된 내용은 getMyCurrentStudy 메서드의 로직을 개선하여 현재 날짜와 시간에 따라 진행 중인 스터디를 필터링하도록 합니다. 기존에는 스터디가 진행 중인지 여부만 확인했으나, 수정된 로직은 스터디의 신청 시작일과 종료일을 기준으로 현재 날짜와 시간을 비교하여 활성 스터디만 고려합니다. 이로 인해 보다 정확한 응답이 생성됩니다.

Changes

파일 경로 변경 요약
src/main/java/com/gdschongik/gdsc/domain/study/application/StudentStudyService.java getMyCurrentStudy 메서드의 로직이 현재 날짜와 시간에 따라 스터디의 신청 기간을 확인하도록 업데이트됨. LocalDateTime 임포트 추가.

Assessment against linked issues

Objective Addressed Explanation
수강중인 스터디 조회시 신청시작일을 기준으로 선별하도록 수정 (#693)

Poem

🐰
스터디의 시간, 이제 확인해요,
신청 기간 안에, 모두 모여요.
정확한 필터, 새로운 길을 열고,
함께 배우는 즐거움, 우리 모두의 꿈!
🌟


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • 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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 758943f and d53e824.

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

20-20: LocalDateTime import 확인

LocalDateTime을 사용하여 날짜와 시간을 비교하는 것은 적절합니다.

변경 사항이 승인되었습니다.


110-111: 필터링 조건 확인

현재 날짜와 시간이 스터디의 신청 시작일과 종료일 사이에 있는지 확인하는 필터링 조건이 올바르게 적용되었습니다.

변경 사항이 승인되었습니다.

Copy link
Member

@AlmondBreez3 AlmondBreez3 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
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

@Sangwook02 Sangwook02 merged commit b582634 into develop Aug 27, 2024
1 check passed
@Sangwook02 Sangwook02 deleted the refactor/693-filter-study-by-application-start-date branch August 27, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ refactor 기능 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️ 수강중인 스터디 조회시 신청시작일을 기준으로 선별하도록 수정
3 participants