From 2aba6f657892e13688071170a117734a45f33249 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Mon, 18 Nov 2024 20:23:23 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=A7=A9=20::=20(#857)=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/ApplicationEventHandler.java | 64 +++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java index d5ae14801..e358af76c 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java @@ -47,14 +47,13 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { event.getApplications().stream().map(Application::getRecruitmentId).toList() ); for (Application application : event.getApplications()) { - String content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; + String companyName = companyNameMap.get(application.getRecruitmentId()); - if (event.getStatus() == ApplicationStatus.PASS) { - content = companyName + "에 합격하셨습니다."; - } + + setNotificationMessage(event, companyName); Notification notification = Notification.builder() - .title("결과 보러가기") + .title(title) .content(content) .userId(application.getStudentId()) .topic(Topic.APPLICATION) @@ -70,4 +69,59 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { ); } } + + private void setNotificationMessage(ApplicationsStatusChangedEvent event, String companyName) { + + switch(event.getStatus()) { + case REQUESTED: + title = "지원서 제출 완료"; + content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; + break; + + case APPROVED: + title = "지원서가 승인되었습니다!"; + content = "지원서가 승인되었어요. 곧 회사에 전송될 거예요!"; + break; + + case SEND: + title = "지원서 전송 완료"; + content = "'" + companyName + "'에 지원서가 성공적으로 전송되었습니다. 좋은 결과를 기원합니다!"; + break; + + case PROCESSING: + title = "지원서가 진행중입니다"; + content = "'" + companyName + "'에서 지원서를 검토 중입니다. 진행 상황을 계속 확인해 주세요."; + break; + + case FAILED: + title = companyName + "지원서 탈락"; + content = "아쉽게도 '" + companyName + "'의 지원에서 탈락하셨습니다. 다음 기회에 더 좋은 결과가 있길 바랍니다."; + break; + + case PASS: + title = "(취뽀) " + companyName + "에 합격하셨습니다!! 🥳"; + content = "합격을 진심으로 축하드립니다."; + break; + + case FIELD_TRAIN: + title = "현장실습이 확정되었습니다!"; + content = "'" + companyName + "'에서 현장실습이 확정되었습니다. 새로운 경험을 통해 성장하시길 바랍니다!"; + break; + + case ACCEPTANCE: + title = "근로계약이 체결됬습니다!"; + content = "'" + companyName + "'과의 근로계약이 체결됬습니다. 새로운 여정을 응원합니다!"; + break; + + case REJECTED: + title = "지원서가 반려되었습니다."; + content = "지원서가 '" + companyName + "'에 의해 반려되었습니다. 지원서 내용을 다시 확인하고 수정 후 재제출해 주세요."; + break; + + default: + title = "지원서 상태가 변경되었습니다"; + content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; + break; + } + } } From d7cec150c9473426ee3f90124a6d4ec79788bdf0 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 21 Nov 2024 09:44:14 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=A7=A9=20::=20(#857)=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=EC=84=9C=20=EC=95=8C=EB=A6=BC=20=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/ApplicationEventHandler.java | 62 ++----------------- .../message/ApplicationMessage.java | 11 ++++ .../retum/jobis/thirdparty/fcm/FCMUtil.java | 60 ++++++++++++++++++ 3 files changed, 75 insertions(+), 58 deletions(-) create mode 100644 jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java index e358af76c..e5978aeca 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java @@ -15,6 +15,7 @@ import team.retum.jobis.domain.notification.spi.CommandNotificationPort; import team.retum.jobis.domain.user.model.User; import team.retum.jobis.domain.user.spi.QueryUserPort; +import team.retum.jobis.event.application.message.ApplicationMessage; import team.retum.jobis.thirdparty.fcm.FCMUtil; import java.util.List; @@ -50,11 +51,11 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { String companyName = companyNameMap.get(application.getRecruitmentId()); - setNotificationMessage(event, companyName); + ApplicationMessage notificationMessage = fcmUtil.applicationMessage(event, companyName); Notification notification = Notification.builder() - .title(title) - .content(content) + .title(notificationMessage.getTitle()) + .content(notificationMessage.getContent()) .userId(application.getStudentId()) .topic(Topic.APPLICATION) .detailId(application.getId()) @@ -69,59 +70,4 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { ); } } - - private void setNotificationMessage(ApplicationsStatusChangedEvent event, String companyName) { - - switch(event.getStatus()) { - case REQUESTED: - title = "지원서 제출 완료"; - content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; - break; - - case APPROVED: - title = "지원서가 승인되었습니다!"; - content = "지원서가 승인되었어요. 곧 회사에 전송될 거예요!"; - break; - - case SEND: - title = "지원서 전송 완료"; - content = "'" + companyName + "'에 지원서가 성공적으로 전송되었습니다. 좋은 결과를 기원합니다!"; - break; - - case PROCESSING: - title = "지원서가 진행중입니다"; - content = "'" + companyName + "'에서 지원서를 검토 중입니다. 진행 상황을 계속 확인해 주세요."; - break; - - case FAILED: - title = companyName + "지원서 탈락"; - content = "아쉽게도 '" + companyName + "'의 지원에서 탈락하셨습니다. 다음 기회에 더 좋은 결과가 있길 바랍니다."; - break; - - case PASS: - title = "(취뽀) " + companyName + "에 합격하셨습니다!! 🥳"; - content = "합격을 진심으로 축하드립니다."; - break; - - case FIELD_TRAIN: - title = "현장실습이 확정되었습니다!"; - content = "'" + companyName + "'에서 현장실습이 확정되었습니다. 새로운 경험을 통해 성장하시길 바랍니다!"; - break; - - case ACCEPTANCE: - title = "근로계약이 체결됬습니다!"; - content = "'" + companyName + "'과의 근로계약이 체결됬습니다. 새로운 여정을 응원합니다!"; - break; - - case REJECTED: - title = "지원서가 반려되었습니다."; - content = "지원서가 '" + companyName + "'에 의해 반려되었습니다. 지원서 내용을 다시 확인하고 수정 후 재제출해 주세요."; - break; - - default: - title = "지원서 상태가 변경되었습니다"; - content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; - break; - } - } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java new file mode 100644 index 000000000..861999ec5 --- /dev/null +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java @@ -0,0 +1,11 @@ +package team.retum.jobis.event.application.message; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public class ApplicationMessage { + private final String title; + private final String content; +} diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java index ba94c8d5d..a2d973616 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java @@ -8,11 +8,13 @@ import com.google.firebase.messaging.Message; import com.google.firebase.messaging.MulticastMessage; import org.springframework.stereotype.Component; +import team.retum.jobis.domain.application.event.ApplicationsStatusChangedEvent; import team.retum.jobis.domain.notification.exception.DeviceTokenNotFoundException; import team.retum.jobis.domain.notification.exception.FailedToSubscriptionException; import team.retum.jobis.domain.notification.exception.FailedToUnsubscriptionException; import team.retum.jobis.domain.notification.model.Notification; import team.retum.jobis.domain.notification.model.Topic; +import team.retum.jobis.event.application.message.ApplicationMessage; import team.retum.jobis.global.exception.FailedSendingMessagesException; import java.util.Arrays; @@ -97,4 +99,62 @@ public void sendMessageToTopic(Notification notification) { throw FailedSendingMessagesException.EXCEPTION; } } + + public ApplicationMessage applicationMessage (ApplicationsStatusChangedEvent event, String companyName) { + String title, content; + + switch(event.getStatus()) { + case REQUESTED: + title = "지원서 제출 완료"; + content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; + break; + + case APPROVED: + title = "지원서가 승인되었습니다!"; + content = "지원서가 승인되었어요. 곧 회사에 전송될 거예요!"; + break; + + case SEND: + title = "지원서 전송 완료"; + content = "'" + companyName + "'에 지원서가 성공적으로 전송되었습니다. 좋은 결과를 기원합니다!"; + break; + + case PROCESSING: + title = "지원서가 진행중입니다"; + content = "'" + companyName + "'에서 지원서를 검토 중입니다. 진행 상황을 계속 확인해 주세요."; + break; + + case FAILED: + title = companyName + "지원서 탈락"; + content = "아쉽게도 '" + companyName + "'의 지원에서 탈락하셨습니다. 다음 기회에 더 좋은 결과가 있길 바랍니다."; + break; + + case PASS: + title = "(취뽀) " + companyName + "에 합격하셨습니다!! 🥳"; + content = "합격을 진심으로 축하드립니다."; + break; + + case FIELD_TRAIN: + title = "현장실습이 확정되었습니다!"; + content = "'" + companyName + "'에서 현장실습이 확정되었습니다. 새로운 경험을 통해 성장하시길 바랍니다!"; + break; + + case ACCEPTANCE: + title = "근로계약이 체결됬습니다!"; + content = "'" + companyName + "'과의 근로계약이 체결됬습니다. 새로운 여정을 응원합니다!"; + break; + + case REJECTED: + title = "지원서가 반려되었습니다."; + content = "지원서가 '" + companyName + "'에 의해 반려되었습니다. 지원서 내용을 다시 확인하고 수정 후 재제출해 주세요."; + break; + + default: + title = "지원서 상태가 변경되었습니다"; + content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; + break; + } + + return new ApplicationMessage(title, content); + } } From 3dfb46dda2bc0355c9fd9bc724173dd0d438c82c Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 21 Nov 2024 09:50:54 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=9B=A0=20::=20(#857)=20=EA=B3=B5?= =?UTF-8?q?=EB=B0=B1=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java index a2d973616..0457d79c9 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java @@ -100,10 +100,11 @@ public void sendMessageToTopic(Notification notification) { } } - public ApplicationMessage applicationMessage (ApplicationsStatusChangedEvent event, String companyName) { - String title, content; + public ApplicationMessage applicationMessage(ApplicationsStatusChangedEvent event, String companyName) { + String title; + String content; - switch(event.getStatus()) { + switch (event.getStatus()) { case REQUESTED: title = "지원서 제출 완료"; content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; From ac0680fc21ebce1556f832d75f7f0ffd0becbfe5 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 21 Nov 2024 14:42:51 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=9B=A0=20::=20(#857)=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobis/event/application/ApplicationEventHandler.java | 1 - .../event/application/{message => }/ApplicationMessage.java | 2 +- .../main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) rename jobis-infrastructure/src/main/java/team/retum/jobis/event/application/{message => }/ApplicationMessage.java (78%) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java index e5978aeca..5cfe75098 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java @@ -15,7 +15,6 @@ import team.retum.jobis.domain.notification.spi.CommandNotificationPort; import team.retum.jobis.domain.user.model.User; import team.retum.jobis.domain.user.spi.QueryUserPort; -import team.retum.jobis.event.application.message.ApplicationMessage; import team.retum.jobis.thirdparty.fcm.FCMUtil; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java similarity index 78% rename from jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java rename to jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java index 861999ec5..ad832e226 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/message/ApplicationMessage.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java @@ -1,4 +1,4 @@ -package team.retum.jobis.event.application.message; +package team.retum.jobis.event.application; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java index 0457d79c9..c2da0a722 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java @@ -14,7 +14,7 @@ import team.retum.jobis.domain.notification.exception.FailedToUnsubscriptionException; import team.retum.jobis.domain.notification.model.Notification; import team.retum.jobis.domain.notification.model.Topic; -import team.retum.jobis.event.application.message.ApplicationMessage; +import team.retum.jobis.event.application.ApplicationMessage; import team.retum.jobis.global.exception.FailedSendingMessagesException; import java.util.Arrays; @@ -141,8 +141,8 @@ public ApplicationMessage applicationMessage(ApplicationsStatusChangedEvent even break; case ACCEPTANCE: - title = "근로계약이 체결됬습니다!"; - content = "'" + companyName + "'과의 근로계약이 체결됬습니다. 새로운 여정을 응원합니다!"; + title = "근로계약이 체결되었습니다!"; + content = "'" + companyName + "'과의 근로계약이 체결되었습니다. 새로운 여정을 응원합니다!"; break; case REJECTED: From 41cb1a89c4fbaade91a8e22d9f3b52ea59b1b9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AA=85=EC=A7=84?= <4mj.eo@dsm.hs.kr> Date: Thu, 21 Nov 2024 17:29:57 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=9B=A0=20::=20(#857)=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=20=EC=9C=84=EC=B9=98=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/ApplicationEventHandler.java | 2 +- .../event/application/ApplicationMessage.java | 60 +++++++++++++++++++ .../retum/jobis/thirdparty/fcm/FCMUtil.java | 59 ------------------ 3 files changed, 61 insertions(+), 60 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java index 5cfe75098..5b811afa3 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java @@ -50,7 +50,7 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { String companyName = companyNameMap.get(application.getRecruitmentId()); - ApplicationMessage notificationMessage = fcmUtil.applicationMessage(event, companyName); + ApplicationMessage notificationMessage = ApplicationMessage.from(event, companyName); Notification notification = Notification.builder() .title(notificationMessage.getTitle()) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java index ad832e226..3d58116a4 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java @@ -2,10 +2,70 @@ import lombok.AllArgsConstructor; import lombok.Getter; +import team.retum.jobis.domain.application.event.ApplicationsStatusChangedEvent; @Getter @AllArgsConstructor public class ApplicationMessage { private final String title; private final String content; + + public static ApplicationMessage from(ApplicationsStatusChangedEvent event, String companyName) { + String title; + String content; + + switch (event.getStatus()) { + case REQUESTED: + title = "지원서 제출 완료"; + content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; + break; + + case APPROVED: + title = "지원서가 승인되었습니다!"; + content = "지원서가 승인되었어요. 곧 회사에 전송될 거예요!"; + break; + + case SEND: + title = "지원서 전송 완료"; + content = "'" + companyName + "'에 지원서가 성공적으로 전송되었습니다. 좋은 결과를 기원합니다!"; + break; + + case PROCESSING: + title = "지원서가 진행중입니다"; + content = "'" + companyName + "'에서 지원서를 검토 중입니다. 진행 상황을 계속 확인해 주세요."; + break; + + case FAILED: + title = companyName + "지원서 탈락"; + content = "아쉽게도 '" + companyName + "'의 지원에서 탈락하셨습니다. 다음 기회에 더 좋은 결과가 있길 바랍니다."; + break; + + case PASS: + title = "(취뽀) " + companyName + "에 합격하셨습니다!! 🥳"; + content = "합격을 진심으로 축하드립니다."; + break; + + case FIELD_TRAIN: + title = "현장실습이 확정되었습니다!"; + content = "'" + companyName + "'에서 현장실습이 확정되었습니다. 새로운 경험을 통해 성장하시길 바랍니다!"; + break; + + case ACCEPTANCE: + title = "근로계약이 체결되었습니다!"; + content = "'" + companyName + "'과의 근로계약이 체결되었습니다. 새로운 여정을 응원합니다!"; + break; + + case REJECTED: + title = "지원서가 반려되었습니다."; + content = "지원서가 '" + companyName + "'에 의해 반려되었습니다. 지원서 내용을 다시 확인하고 수정 후 재제출해 주세요."; + break; + + default: + title = "지원서 상태가 변경되었습니다"; + content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; + break; + } + + return new ApplicationMessage(title, content); + } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java index c2da0a722..15f3292e5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java @@ -99,63 +99,4 @@ public void sendMessageToTopic(Notification notification) { throw FailedSendingMessagesException.EXCEPTION; } } - - public ApplicationMessage applicationMessage(ApplicationsStatusChangedEvent event, String companyName) { - String title; - String content; - - switch (event.getStatus()) { - case REQUESTED: - title = "지원서 제출 완료"; - content = "지원서가 제출되었습니다. 검토가 진행될 예정입니다. 조금만 기다려 주세요!"; - break; - - case APPROVED: - title = "지원서가 승인되었습니다!"; - content = "지원서가 승인되었어요. 곧 회사에 전송될 거예요!"; - break; - - case SEND: - title = "지원서 전송 완료"; - content = "'" + companyName + "'에 지원서가 성공적으로 전송되었습니다. 좋은 결과를 기원합니다!"; - break; - - case PROCESSING: - title = "지원서가 진행중입니다"; - content = "'" + companyName + "'에서 지원서를 검토 중입니다. 진행 상황을 계속 확인해 주세요."; - break; - - case FAILED: - title = companyName + "지원서 탈락"; - content = "아쉽게도 '" + companyName + "'의 지원에서 탈락하셨습니다. 다음 기회에 더 좋은 결과가 있길 바랍니다."; - break; - - case PASS: - title = "(취뽀) " + companyName + "에 합격하셨습니다!! 🥳"; - content = "합격을 진심으로 축하드립니다."; - break; - - case FIELD_TRAIN: - title = "현장실습이 확정되었습니다!"; - content = "'" + companyName + "'에서 현장실습이 확정되었습니다. 새로운 경험을 통해 성장하시길 바랍니다!"; - break; - - case ACCEPTANCE: - title = "근로계약이 체결되었습니다!"; - content = "'" + companyName + "'과의 근로계약이 체결되었습니다. 새로운 여정을 응원합니다!"; - break; - - case REJECTED: - title = "지원서가 반려되었습니다."; - content = "지원서가 '" + companyName + "'에 의해 반려되었습니다. 지원서 내용을 다시 확인하고 수정 후 재제출해 주세요."; - break; - - default: - title = "지원서 상태가 변경되었습니다"; - content = "지원서 상태가 " + event.getStatus().getName() + "으로 변경되었습니다."; - break; - } - - return new ApplicationMessage(title, content); - } } From 1d3fb86e2a42380ded9b626bb627f0fcc079adcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AA=85=EC=A7=84?= <4mj.eo@dsm.hs.kr> Date: Thu, 21 Nov 2024 20:00:48 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=9B=A0=20::=20(#857)=20from=20->=20of?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../retum/jobis/event/application/ApplicationEventHandler.java | 2 +- .../team/retum/jobis/event/application/ApplicationMessage.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java index 5b811afa3..58af6eb1f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationEventHandler.java @@ -50,7 +50,7 @@ public void onApplicationStatusChanged(ApplicationsStatusChangedEvent event) { String companyName = companyNameMap.get(application.getRecruitmentId()); - ApplicationMessage notificationMessage = ApplicationMessage.from(event, companyName); + ApplicationMessage notificationMessage = ApplicationMessage.of(event, companyName); Notification notification = Notification.builder() .title(notificationMessage.getTitle()) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java index 3d58116a4..f84c048d4 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.java @@ -10,7 +10,7 @@ public class ApplicationMessage { private final String title; private final String content; - public static ApplicationMessage from(ApplicationsStatusChangedEvent event, String companyName) { + public static ApplicationMessage of(ApplicationsStatusChangedEvent event, String companyName) { String title; String content; From 14b42f56f30c4e8974bfa9daf9b05e164f1df1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AA=85=EC=A7=84?= <4mj.eo@dsm.hs.kr> Date: Fri, 22 Nov 2024 08:48:52 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=A6=B7=20::=20(#857)=20=EB=AF=B8?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20import=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java index 15f3292e5..ba94c8d5d 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/fcm/FCMUtil.java @@ -8,13 +8,11 @@ import com.google.firebase.messaging.Message; import com.google.firebase.messaging.MulticastMessage; import org.springframework.stereotype.Component; -import team.retum.jobis.domain.application.event.ApplicationsStatusChangedEvent; import team.retum.jobis.domain.notification.exception.DeviceTokenNotFoundException; import team.retum.jobis.domain.notification.exception.FailedToSubscriptionException; import team.retum.jobis.domain.notification.exception.FailedToUnsubscriptionException; import team.retum.jobis.domain.notification.model.Notification; import team.retum.jobis.domain.notification.model.Topic; -import team.retum.jobis.event.application.ApplicationMessage; import team.retum.jobis.global.exception.FailedSendingMessagesException; import java.util.Arrays;