Conversation
Test Results32 tests 32 ✅ 0s ⏱️ Results for commit 80882fc. ♻️ This comment has been updated with latest results. |
한눈에 보는 변경사항이번 PR은 기존에 분산되어 있던 월간 근무/수입 조회를 월 캘린더 화면 기준의 단일 API로 통합한 변경입니다. 새로 추가된 API는 다음과 같습니다.
이 API는 단순히 날짜 목록만 내려주는 것이 아니라, 아래 정보를 한 번에 제공합니다.
핵심 변경 사항1. 월 캘린더 통합 API 추가
응답 구조는
기존에는 아래 API들을 조합해서 사용해야 했지만,
이제 캘린더 화면에서는 하나의 API로 처리할 수 있습니다. 2. 날짜별 상세 응답 추가캘린더 API의 날짜별 응답은
이를 통해 클라이언트는 날짜별로 아래 정보를 바로 사용할 수 있습니다.
참고로 기존 월간 조회 API 3. 근무 상태(
|
…ype and DailyEventType for consistency
There was a problem hiding this comment.
Pull request overview
Introduces a new monthly calendar API for the screen layer and expands schedule/earnings responses to include daily work status and calendar events, while also reorganizing some controller packages and updating payday notification date resolution.
Changes:
- Added
/api/v1/calendarendpoint returning monthly earnings + per-day schedules. - Extended schedule/home DTOs with
statusand added per-dayeventssupport (e.g., payday). - Updated payday notification batching to adjust payday to month-end and prior Friday when it falls on weekends; reorganized/retagged several controllers.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/com/moa/controller/screen/CalendarController.kt | New calendar screen endpoint combining monthly earnings + daily schedules. |
| src/main/kotlin/com/moa/service/WorkdayService.kt | Adds monthly workday listing, enhances earnings calc for “today”, and enriches WorkdayResponse with status/events (incl. payday logic). |
| src/main/kotlin/com/moa/service/dto/CalendarResponse.kt | New response wrapper for the calendar endpoint. |
| src/main/kotlin/com/moa/service/dto/WorkdayResponse.kt | Adds status and events fields to daily schedule response. |
| src/main/kotlin/com/moa/service/dto/HomeResponse.kt | Adds status field to home response. |
| src/main/kotlin/com/moa/entity/DailyWorkStatusType.kt | New enum for daily work status. |
| src/main/kotlin/com/moa/entity/DailyEventType.kt | New enum for per-day calendar events (e.g., payday/holiday). |
| src/main/kotlin/com/moa/service/notification/PaydayNotificationBatchService.kt | Updates payday profile selection to use “effective payday” with month-end + weekend adjustment. |
| src/main/kotlin/com/moa/controller/WorkdayController.kt | Deprecates older monthly endpoints in favor of calendar endpoint; keeps legacy routes. |
| src/main/kotlin/com/moa/controller/screen/HomeController.kt | Moves to controller.screen package and includes status in response. |
| src/main/kotlin/com/moa/controller/screen/OnboardingController.kt | Moves to controller.screen package and updates Swagger tag description. |
| src/main/kotlin/com/moa/controller/ProfileController.kt | Import ordering + Swagger tag description simplified. |
| src/main/kotlin/com/moa/controller/NotificationSettingController.kt | Swagger tag description simplified. |
| src/main/kotlin/com/moa/controller/FcmTokenController.kt | Swagger tag description updated. |
| src/main/kotlin/com/moa/controller/AuthController.kt | DTO imports consolidated + Swagger tag description simplified. |
Comments suppressed due to low confidence (1)
src/main/kotlin/com/moa/service/WorkdayService.kt:303
createWorkdayResponseresolves the monthly representative policy viaresolveMonthlyRepresentativePolicyOrNull(...)even when callers (likegetMonthlyWorkdays) already computedmonthlyPolicy. For monthly list responses this can cause repeated DB queries for the same policy; consider threading the policy into this method (or adding an overload) to reuse the pre-fetched value.
val policy = resolveMonthlyRepresentativePolicyOrNull(memberId, date.year, date.monthValue)
?: return WorkdayResponse(
date = date,
type = schedule.type,
status = resolveDailWorkStatus(date, schedule),
events = events,
dailyPay = 0,
clockInTime = schedule.clockIn,
clockOutTime = schedule.clockOut,
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
src/main/kotlin/com/moa/service/notification/PaydayNotificationBatchService.kt
Outdated
Show resolved
Hide resolved
…ed payday resolution and event handling
This pull request introduces a new calendar API endpoint and refactors related code to support richer calendar functionality, including schedule status and event types. The changes also reorganize controller files and add new domain types for calendar events and daily work status.
Calendar API and Schedule Enhancements:
CalendarControllerunder/api/v1/calendarthat provides a monthly calendar view including earnings and daily schedules, replacing previous endpoints inWorkdayController. (src/main/kotlin/com/moa/controller/screen/CalendarController.kt, src/main/kotlin/com/moa/controller/screen/CalendarController.ktR1-R26)WorkdayServiceto support the new calendar API, including a newgetCalendarmethod, improvedgetMonthlyEarnings, and enhancedWorkdayResponsewith schedule status and calendar events. (src/main/kotlin/com/moa/service/WorkdayService.kt, [1] [2] [3] [4] [5]CalendarResponseand updatedWorkdayResponseto includestatusandeventsfields. (src/main/kotlin/com/moa/service/dto/CalendarResponse.kt, [1];src/main/kotlin/com/moa/service/dto/WorkdayResponse.kt, [2]Domain Model Additions:
CalendarEventTypeandDailWorkStatusTypeenums to represent calendar events (e.g., payday, holiday) and daily work status (e.g., scheduled, in progress, completed). (src/main/kotlin/com/moa/entity/CalendarEventType.kt, [1];src/main/kotlin/com/moa/entity/DailWorkStatusType.kt, [2]Controller Reorganization:
HomeControllerandOnboardingControllerare now undercontroller.screen. (src/main/kotlin/com/moa/controller/screen/HomeController.kt, [1];src/main/kotlin/com/moa/controller/screen/OnboardingController.kt, [2]HomeResponseto include the newstatusfield reflecting daily work status. (src/main/kotlin/com/moa/service/dto/HomeResponse.kt, [1] [2];src/main/kotlin/com/moa/controller/screen/HomeController.kt, [3]Deprecation and API Guidance:
WorkdayController, directing users to use the new calendar API instead. (src/main/kotlin/com/moa/controller/WorkdayController.kt, [1] [2]Miscellaneous:
src/main/kotlin/com/moa/service/notification/PaydayNotificationBatchService.kt, src/main/kotlin/com/moa/service/notification/PaydayNotificationBatchService.ktR8)These changes collectively modernize the calendar and scheduling features, provide richer data for UI, and improve code organization.