-
Notifications
You must be signed in to change notification settings - Fork 0
[fix] FCM 메세지 분류용 messageType 필드 추가 #325
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b46d01e
[feat]: fcm 메세지 분류용 messageType 필드 추가
jiyun921 2d322fc
[feat]: 테스트 학사일정 알림 전송 api 구현
jiyun921 5410edf
[test]: 테스트 학사일정 알림 전송 api 테스트 구현
jiyun921 2db9f68
[refactor]: MessageType enum화
jiyun921 e912cf5
[refactor]: 학사일정 테스트 step 객체로 관리
jiyun921 da998f1
[refactor]: putData 맵 하나로 통합
jiyun921 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...in/java/com/kustacks/kuring/admin/adapter/in/web/dto/AcademicTestNotificationRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.kustacks.kuring.admin.adapter.in.web.dto; | ||
|
|
||
| import com.kustacks.kuring.message.application.port.in.dto.AcademicTestNotificationCommand; | ||
|
|
||
| public record AcademicTestNotificationRequest( | ||
| String title, | ||
| String body | ||
| ) { | ||
| public AcademicTestNotificationCommand toCommand() { | ||
| return new AcademicTestNotificationCommand(title, body); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
.../java/com/kustacks/kuring/message/adapter/in/event/dto/AcademicTestNotificationEvent.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.kustacks.kuring.message.adapter.in.event.dto; | ||
|
|
||
| import com.kustacks.kuring.message.application.port.in.dto.AcademicTestNotificationCommand; | ||
|
|
||
| public record AcademicTestNotificationEvent( | ||
| String title, | ||
| String body | ||
| ) { | ||
| public AcademicTestNotificationCommand toCommand() { | ||
| return new AcademicTestNotificationCommand(title, body); | ||
| } | ||
| } |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/kustacks/kuring/message/application/port/in/FirebaseWithAdminUseCase.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,14 @@ | ||
| package com.kustacks.kuring.message.application.port.in; | ||
|
|
||
| import com.kustacks.kuring.message.application.port.in.dto.AcademicTestNotificationCommand; | ||
| import com.kustacks.kuring.message.application.port.in.dto.AdminNotificationCommand; | ||
| import com.kustacks.kuring.message.application.port.in.dto.AdminTestNotificationCommand; | ||
|
|
||
| public interface FirebaseWithAdminUseCase { | ||
| void sendNotificationByAdmin(AdminNotificationCommand command); | ||
|
|
||
| void sendTestNotificationByAdmin(AdminTestNotificationCommand command); | ||
|
|
||
| void sendAcademicTestNotification(AcademicTestNotificationCommand command); | ||
|
|
||
| } |
7 changes: 7 additions & 0 deletions
7
.../com/kustacks/kuring/message/application/port/in/dto/AcademicTestNotificationCommand.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.kustacks.kuring.message.application.port.in.dto; | ||
|
|
||
| public record AcademicTestNotificationCommand( | ||
| String title, | ||
| String body | ||
| ) { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/kustacks/kuring/message/domain/MessageType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.kustacks.kuring.message.domain; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| @Getter | ||
| @RequiredArgsConstructor | ||
| public enum MessageType { | ||
|
Member
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. enum화 하여 관리하시는점 좋습니다!! |
||
|
|
||
| NOTICE("notice"), | ||
| ADMIN("admin"), | ||
| ACADEMIC("academic"); | ||
|
|
||
| private final String value; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
근데, 이걸 test용도로 만들어다는거는? 향후 Prod 목적으로도 동일한 메서드가 추가되는건가요? 단일 메서드를 두고 환경(머신 자체의 linux 환경값에)에 따라 다르게 전달하는건 어떤가요?
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.
학사일정 알림이 원래는 스케줄러에서 자동으로 전송돼서 prod용으로 수동 전송하는 api를 따로 추가안할 것 같습니다! 이건 test용도로 수동으로 알림 전송해봐서 확인해보려고 만들었습니다!
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.
엇 근데 지금 공지 알림 전송은 test용이랑 prod용 메서드가 따로 존재하네요! 단일 메서드로 하면 코드가 깔끔해질 것 같긴 한데 실수로 prod로 알림이 전송되는 일이 있을 수도 있어서.. 어떤게 더 좋을까여??
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.
메서드에서 test를 명시해주신 지금 방식이 더 주의를 할 수 있어서 장점이 충분한것 같습니다!.
지금 방식으로 가시죠~