Skip to content

feat: 마음 기록 달력 조회 기능 구현#87

Merged
Neibce merged 1 commit intomainfrom
be/feat/maum-monthly-report
Aug 7, 2025
Merged

feat: 마음 기록 달력 조회 기능 구현#87
Neibce merged 1 commit intomainfrom
be/feat/maum-monthly-report

Conversation

@Neibce
Copy link
Owner

@Neibce Neibce commented Aug 7, 2025

Summary by CodeRabbit

  • 신규 기능
    • 가족 구성원들의 월별 다이어리 작성 현황을 조회할 수 있는 캘린더 API가 추가되었습니다.
    • 월별로 날짜별 작성 인원 수와 전체 가족 구성원 수를 확인할 수 있습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 7, 2025

Walkthrough

이번 변경사항은 마음일지 캘린더 데이터를 조회하는 새로운 API 엔드포인트를 추가하고, 해당 기능을 위한 DTO, 리포지토리, 서비스 계층의 메서드 및 인터페이스를 도입한 것입니다. 모든 변경은 마음일지 캘린더 조회 기능 신설에 집중되어 있습니다.

Changes

Cohort / File(s) Change Summary
마음일지 캘린더 API 엔드포인트 추가
backend/ongi/src/main/java/ongi/maum_log/controller/MaumLogController.java
/calendar GET 엔드포인트 추가. 인증 사용자와 선택적 yearMonth 파라미터로 마음일지 캘린더 데이터를 조회하여 반환하는 메서드 신설.
캘린더 DTO 및 인터페이스 도입
backend/ongi/src/main/java/ongi/maum_log/dto/DateCount.java, backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogCalendarDto.java
일자별 카운트 정보를 위한 DateCount 인터페이스와, 전체 인원수 및 일자별 작성 인원수를 포함하는 MaumLogCalendarDto 레코드 클래스 도입. DTO에 정적 팩토리 메서드 추가.
리포지토리 쿼리 메서드 추가
backend/ongi/src/main/java/ongi/maum_log/repository/MaumLogRepository.java
사용자 목록과 월 단위로 일자별 일지 작성 수를 집계하는 네이티브 쿼리 기반 메서드 추가. DateCount 반환.
서비스 계층 캘린더 집계 로직
backend/ongi/src/main/java/ongi/maum_log/service/MaumLogService.java
가족 구성원 전체의 월별 일지 작성 현황을 집계하여 DTO로 가공하는 getMaumLogCalendar 메서드 추가. 가족 정보 조회 및 예외 처리, 일자별 집계 및 0채움 처리 포함.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Controller
    participant Service
    participant FamilyRepository
    participant MaumLogRepository

    Client->>Controller: GET /calendar?yearMonth=YYYY-MM
    Controller->>Service: getMaumLogCalendar(userDetails, yearMonth)
    Service->>FamilyRepository: findByUserUuid(userUuid)
    FamilyRepository-->>Service: Family
    Service->>MaumLogRepository: countDiariesPerDayByUsersAndMonth(users, startDate, endDate)
    MaumLogRepository-->>Service: List<DateCount>
    Service->>Service: 집계 및 Map 완성
    Service-->>Controller: MaumLogCalendarDto
    Controller-->>Client: 200 OK + MaumLogCalendarDto
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Poem

🐰
새로운 달력 API가 열렸어요,
가족 마음일지 한눈에 보여요.
일별로 모인 숫자들,
빈 날도 빠짐없이 채워요.
토끼는 깡총깡총 뛰며,
코드 속 달력을 구경해요!
🌙📅


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 6ca2e71 and 0bf75e7.

📒 Files selected for processing (5)
  • backend/ongi/src/main/java/ongi/maum_log/controller/MaumLogController.java (2 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/dto/DateCount.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogCalendarDto.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/repository/MaumLogRepository.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/service/MaumLogService.java (3 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
  • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using 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 generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@Neibce Neibce merged commit 3cdc79a into main Aug 7, 2025
4 checks passed
@oxomi oxomi deleted the be/feat/maum-monthly-report branch August 8, 2025 08:37
Neibce added a commit to 2025-PNU-SW-Hackathon/PNUSW-2025-OnGi-10 that referenced this pull request Aug 25, 2025
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.

1 participant