Conversation
…o feature/mosu-320
…ositSuccessEventHandler
…WithSmsFallbackSender
MOSU-320 feat: 제휴업체 신청 완료 알림톡 템플릿 추가
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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 (
|
There was a problem hiding this comment.
Summary of Changes
Hello @polyglot-k, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
이 풀 리퀘스트는 게스트 시험 신청 완료에 대한 새로운 알림톡/SMS 알림 기능을 추가하고, 결제 및 환불 실패 로그를 보관하기 위한 관리자 엔드포인트를 도입합니다.
Highlights
- 게스트 신청 알림 추가: 게스트 시험 신청 완료 시 발송되는 새로운 알림톡/SMS 알림이 추가되었습니다.
- 새로운 DTO 정의: 게스트 신청 알림에 필요한 데이터를 포함하는 ApplicationGuestNotifyRequest DTO가 새로 정의되었습니다.
- 입금 성공 이벤트 핸들러 업데이트: 입금 성공 시 기존 일반 신청 완료 알림 대신 게스트 신청 완료 알림이 트리거되도록 변경되었습니다.
- 전화번호 형식 처리 개선: 사용자 전화번호에서 'U' 또는 'G' 접두사를 제거하도록 UserJpaEntity의 전화번호 형식 처리 로직이 업데이트되었습니다.
- 관리자 로그 보관 엔드포인트 추가: 결제 및 환불 실패 로그를 수동으로 보관할 수 있는 관리자 전용 /cleanup POST 엔드포인트가 추가되었습니다.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
게스트 신청 알림톡 추가 기능 구현을 위한 변경 사항 잘 보았습니다. 전반적으로 기능 구현은 잘 이루어진 것 같지만, 몇 가지 개선점을 제안합니다. NotifyVariableFactory에서 코드 중복을 줄일 수 있는 부분이 있으며, 새로 추가된 DTO에서 상수를 활용하여 가독성을 높일 수 있습니다. 또한, 새로 추가된 관리자용 API의 응답 메시지가 실제 기능과 일치하지 않는 부분이 있어 수정이 필요해 보입니다. 자세한 내용은 각 파일에 남긴 코멘트를 참고해주세요.
| private LunaNotificationVariable createApplicationGuestVariable(Long targetId) { | ||
| ExamApplicationNotifyProjection projection = examApplicationRepository.findExamAndPaymentByExamApplicationId( | ||
| targetId) | ||
| .orElseThrow( | ||
| () -> new CustomRuntimeException(ErrorCode.EXAM_APPLICATION_NOT_FOUND)); | ||
| return ApplicationGuestNotifyRequest.from(projection); | ||
| } |
| return new ApplicationGuestNotifyRequest(examApplication.paymentKey(), | ||
| examApplication.examDate(), examApplication.schoolName(), | ||
| examApplication.isLunchChecked() ? examApplication.lunchName() | ||
| : "선택 안 함"); |
| @PreAuthorize("isAuthenticated() and hasRole('ADMIN')") | ||
| public ApiResponseWrapper<Void> archivePaymentFailureLogs() { | ||
| paymentFailureLogDomainArchiveExecutor.archive(); | ||
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); |
There was a problem hiding this comment.
archivePaymentFailureLogs 메소드는 결제 실패 로그를 아카이빙하는 기능을 수행하지만, API 성공 응답 메시지가 "게스트 결제 승인 성공"으로 되어 있어 기능과 일치하지 않습니다. 혼란을 방지하기 위해 메시지를 "결제 실패 로그 아카이빙 성공"과 같이 실제 기능에 맞게 수정하는 것이 좋겠습니다.
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); | |
| return ApiResponseWrapper.success(HttpStatus.CREATED, "결제 실패 로그 아카이빙 성공"); |
| @PreAuthorize("isAuthenticated() and hasRole('ADMIN')") | ||
| public ApiResponseWrapper<Void> archiveRefundFailureLogs() { | ||
| refundFailureLogDomainArchiveExecutor.archive(); | ||
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); |
There was a problem hiding this comment.
archiveRefundFailureLogs 메소드는 환불 실패 로그를 아카이빙하는 기능을 수행하지만, API 성공 응답 메시지가 "게스트 결제 승인 성공"으로 되어 있어 기능과 일치하지 않습니다. 혼란을 방지하기 위해 메시지를 "환불 실패 로그 아카이빙 성공"과 같이 실제 기능에 맞게 수정하는 것이 좋겠습니다.
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); | |
| return ApiResponseWrapper.success(HttpStatus.CREATED, "환불 실패 로그 아카이빙 성공"); |
| \u25A0 \uC2DC\uD5D8\uC7A5\uC18C: #{schoolName}\n\ | ||
| \u25A0 \uB3C4\uC2DC\uB77D: #{lunch}\n\n\ | ||
| \uC2DC\uD5D8 1\uC8FC\uC77C \uC804, \uC2DC\uD5D8 \uAD00\uB828 \uC720\uC758\uC0AC\uD56D\uACFC \uC218\uD5D8\uD45C \uC548\uB0B4 \uB9AC\uB9C8\uC778\uB4DC \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB420 \uC608\uC815\uC785\uB2C8\uB2E4.\n\n\ | ||
| \uC720\uC758\uC0AC\uD56D \uBC14\uB85C\uAC00\uAE30 : https://www.mosuedu.com/warning |
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타