-
Notifications
You must be signed in to change notification settings - Fork 0
fix: 햇빛 주기 수정 #164
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
fix: 햇빛 주기 수정 #164
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough이 PR은 시간대 처리를 Asia/Seoul로 일원화하고, GardenService의 물주기/햇빛 로직과 예외 처리 흐름을 수정했으며, DiaryInfoResponse의 아바타 기반 프로필 이미지 조회를 NPE 안전하게 변경하고, 테스트를 Mockito 단위 테스트에서 DataJpaTest 기반 통합 스타일로 전환했습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant S as GardenService
participant G as Garden
participant R as GardenRepository
Note over S: 모든 시간 계산은 Asia/Seoul 기반(nowInSeoul)
U->>S: waterOwnGarden(gardenId)
S->>R: findById(gardenId)
alt not found
S-->>U: throw CustomApiException(GARDEN_NOT_FOUND)
else found
S->>S: check 8h cooldown (nowInSeoul)
alt cooling
S-->>U: throw CustomApiException(WATER_COOL_DOWN)
else allowed
S->>G: recordOwnerWateringTime(nowInSeoul)
S->>R: save(G)
S-->>U: return success
end
end
sequenceDiagram
autonumber
participant U as User
participant S as GardenService
participant G as Garden
participant R as GardenRepository
Note over S: 햇빛 일자 시작 = 매일 06:00(Asia/Seoul)
U->>S: sunlightGarden(gardenId)
S->>R: findById(gardenId)
alt not found
S-->>U: throw CustomApiException(GARDEN_NOT_FOUND)
else found
S->>S: getStartOfCurrentSunlightDay()
S->>S: validate access
alt unauthorized
S-->>U: throw CustomApiException(ACCESS_DENIED)
else authorized
S->>S: check daily limit since 06:00
alt already given today
S-->>U: throw CustomApiException(SUNLIGHT_COOL_DOWN)
else allowed
S->>G: recordSunlightTime(nowInSeoul)
S->>R: save(G)
S-->>U: return success
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewersPoem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (4)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
📝 개요
이번 PR의 핵심 내용을 한 줄로 요약해 주세요.
💻 작업 내용
이번 PR에서 작업한 내용을 상세히 설명해 주세요.
작업 내용 1
작업 내용 2
...
✅ PR 체크리스트
PR을 보내기 전에 아래 체크리스트를 확인해 주세요.
커밋 메시지는 포맷에 맞게 작성했나요?
스스로 코드를 다시 한번 검토했나요?
관련 이슈를 연결했나요?
빌드 및 테스트가 로컬에서 성공했나요?
🔗 관련 이슈
스크린샷 (선택)
UI 변경 사항이 있다면 스크린샷을 첨부해 주세요.
Summary by CodeRabbit