-
Notifications
You must be signed in to change notification settings - Fork 2
prod : 게스트 신청 알림톡 추가 #322
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
prod : 게스트 신청 알림톡 추가 #322
Changes from all commits
9031145
1c64a57
add7bd3
a3a7a59
1c0bb16
860426f
4d5dbf1
38d42ae
dfe2173
b51ec27
54683b4
b7a9edb
1cc8df7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package life.mosu.mosuserver.application.notify.dto; | ||
|
|
||
|
|
||
| import static life.mosu.mosuserver.infra.notify.constant.NotifyRedirectUrlConstants.WARNING_PAGE; | ||
|
|
||
| import java.time.LocalDate; | ||
| import java.util.Map; | ||
| import life.mosu.mosuserver.domain.examapplication.projection.ExamApplicationNotifyProjection; | ||
| import life.mosu.mosuserver.infra.notify.dto.luna.LunaNotificationButtonUrls; | ||
| import life.mosu.mosuserver.infra.notify.dto.luna.LunaNotificationButtonUrls.NotificationButtonUrl; | ||
| import life.mosu.mosuserver.infra.notify.dto.luna.LunaNotificationVariable; | ||
|
|
||
| public record ApplicationGuestNotifyRequest( | ||
| String paymentKey, | ||
| LocalDate examDate, | ||
| String schoolName, | ||
| String lunch | ||
| ) implements LunaNotificationVariable { | ||
|
|
||
| public static ApplicationGuestNotifyRequest from( | ||
| ExamApplicationNotifyProjection examApplication) { | ||
|
|
||
| return new ApplicationGuestNotifyRequest(examApplication.paymentKey(), | ||
| examApplication.examDate(), examApplication.schoolName(), | ||
| examApplication.isLunchChecked() ? examApplication.lunchName() | ||
| : "선택 안 함"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| @Override | ||
| public LunaNotificationButtonUrls getNotificationButtonUrls() { | ||
| return LunaNotificationButtonUrls.of( | ||
| NotificationButtonUrl.of(WARNING_PAGE, WARNING_PAGE) | ||
| ); | ||
| } | ||
|
|
||
| @Override | ||
| public Map<String, String> toMap() { | ||
| return Map.of( | ||
| "paymentKey", paymentKey, | ||
| "examDate", examDate.toString(), | ||
| "schoolName", schoolName, | ||
| "lunch", lunch | ||
| ); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |||||
| import jakarta.validation.Valid; | ||||||
| import life.mosu.mosuserver.application.payment.PaymentConfirmService; | ||||||
| import life.mosu.mosuserver.application.payment.PaymentPrepareService; | ||||||
| import life.mosu.mosuserver.application.payment.cron.PaymentFailureLogDomainArchiveExecutor; | ||||||
| import life.mosu.mosuserver.global.annotation.UserId; | ||||||
| import life.mosu.mosuserver.global.util.ApiResponseWrapper; | ||||||
| import life.mosu.mosuserver.presentation.payment.dto.PaymentPrepareResponse; | ||||||
|
|
@@ -23,12 +24,13 @@ public class PaymentWidgetController { | |||||
|
|
||||||
| private final PaymentPrepareService prepareService; | ||||||
| private final PaymentConfirmService confirmService; | ||||||
| private final PaymentFailureLogDomainArchiveExecutor paymentFailureLogDomainArchiveExecutor; | ||||||
|
|
||||||
| /** | ||||||
| * 결제 준비 요청 | ||||||
| * <p> | ||||||
| * 결제 준비 요청은 결제 시작을 위한 준비 단계로, 결제 금액과 주문 ID를 생성합니다. | ||||||
| * 이 단계에서는 실제 결제가 이루어지지 않으며, 결제 승인 요청을 위한 정보를 반환합니다. | ||||||
| * 결제 준비 요청은 결제 시작을 위한 준비 단계로, 결제 금액과 주문 ID를 생성합니다. 이 단계에서는 실제 결제가 이루어지지 않으며, 결제 승인 요청을 위한 정보를 | ||||||
| * 반환합니다. | ||||||
| * | ||||||
| * @param userId 사용자 ID | ||||||
| * @param request 결제 준비 요청 정보 | ||||||
|
|
@@ -59,4 +61,12 @@ public ApiResponseWrapper<Void> confirm( | |||||
| confirmService.confirm(userId, request); | ||||||
| return ApiResponseWrapper.success(HttpStatus.CREATED, "결제 승인 성공"); | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
| @PostMapping("/cleanup") | ||||||
| @PreAuthorize("isAuthenticated() and hasRole('ADMIN')") | ||||||
| public ApiResponseWrapper<Void> archivePaymentFailureLogs() { | ||||||
| paymentFailureLogDomainArchiveExecutor.archive(); | ||||||
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,7 @@ | ||||||
| package life.mosu.mosuserver.presentation.refund; | ||||||
|
|
||||||
| import life.mosu.mosuserver.application.refund.RefundService; | ||||||
| import life.mosu.mosuserver.application.refund.cron.RefundFailureLogDomainArchiveExecutor; | ||||||
| import life.mosu.mosuserver.global.annotation.UserId; | ||||||
| import life.mosu.mosuserver.global.util.ApiResponseWrapper; | ||||||
| import life.mosu.mosuserver.presentation.refund.dto.MergedRefundRequest; | ||||||
|
|
@@ -26,6 +27,7 @@ | |||||
| public class RefundController { | ||||||
|
|
||||||
| private final RefundService refundService; | ||||||
| private final RefundFailureLogDomainArchiveExecutor refundFailureLogDomainArchiveExecutor; | ||||||
|
|
||||||
| @GetMapping() | ||||||
| ResponseEntity<ApiResponseWrapper<RefundAmountResponse>> getRefundAmount( | ||||||
|
|
@@ -46,4 +48,11 @@ ResponseEntity<ApiResponseWrapper<Void>> process( | |||||
| refundService.doProcess(userId, request); | ||||||
| return ResponseEntity.ok(ApiResponseWrapper.success(HttpStatus.OK, "결제 취소 성공")); | ||||||
| } | ||||||
|
|
||||||
| @PostMapping("/cleanup") | ||||||
| @PreAuthorize("isAuthenticated() and hasRole('ADMIN')") | ||||||
| public ApiResponseWrapper<Void> archiveRefundFailureLogs() { | ||||||
| refundFailureLogDomainArchiveExecutor.archive(); | ||||||
| return ApiResponseWrapper.success(HttpStatus.CREATED, "게스트 결제 승인 성공"); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,21 @@ notify.exam.application.complete.sms=\ | |
| \uB9C8\uC774\uD398\uC774\uC9C0 \uBC14\uB85C\uAC00\uAE30: https://www.mosuedu.com/mypage\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\ | ||
| \uC720\uC758\uC0AC\uD56D \uBC14\uB85C\uAC00\uAE30: https://www.mosuedu.com/warning | ||
| notify.exam.guest.application.complete.alimtalk=\ | ||
| [\uBAA8\uC218] \uBAA8\uC758\uC218\uB2A5 \uC2E0\uCCAD\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!\n\n\ | ||
| \u25A0 \uACB0\uC81C\uBC88\uD638: #{paymentKey}\n\ | ||
| \u25A0 \uC751\uC2DC\uC77C\uC790: #{examDate}\n\ | ||
| \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. | ||
| notify.exam.guest.application.complete.sms=\ | ||
| [\uBAA8\uC218] \uBAA8\uC758\uC218\uB2A5 \uC2E0\uCCAD\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!\n\n\ | ||
| \u25A0 \uACB0\uC81C\uBC88\uD638: #{paymentKey}\n\ | ||
| \u25A0 \uC751\uC2DC\uC77C\uC790: #{examDate}\n\ | ||
| \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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| notify.exam.oneweek.reminder.alimtalk=\ | ||
| [\uBAA8\uC218] \uBAA8\uC758\uC218\uB2A5\uC774 1\uC8FC\uC77C \uC55E\uC73C\uB85C \uB2E4\uAC00\uC654\uC2B5\uB2C8\uB2E4!\n\n\ | ||
| \u25A0 \uC2DC\uD5D8\uC77C\uC790: #{examDate}\n\ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
새로 추가된
createApplicationGuestVariable메소드의 내용은createApplicationVariable메소드(79-85행)와 거의 동일합니다. 코드 중복은 유지보수성을 저해할 수 있으므로, 공통 로직(ExamApplicationNotifyProjection조회)을 별도의 private 메소드로 추출하여 중복을 제거하는 것을 고려해 보시는 것이 좋겠습니다.