-
Notifications
You must be signed in to change notification settings - Fork 1
✨ OMF-218 설문 마감시 사용자에게 푸시알림 #117
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
base: develop
Are you sure you want to change the base?
Changes from 6 commits
ea83d20
b689d39
406e083
9f355a1
acccde6
0d2f43e
63877e8
c2ef025
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,26 @@ | ||
| package OneQ.OnSurvey.domain.participation.model.event; | ||
|
|
||
| import OneQ.OnSurvey.global.common.event.pushAlim.PushAlimEvent; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public record SurveyCompletedEvent ( | ||
| Long userKey, | ||
| Map<String, String> eventContext | ||
| ) implements PushAlimEvent { | ||
|
|
||
| @Override | ||
| public Long getTargetUserKey() { | ||
| return userKey; | ||
| } | ||
|
|
||
| @Override | ||
| public String getPushTemplateName() { | ||
| return this.getClass().getSimpleName(); | ||
| } | ||
|
|
||
| @Override | ||
| public Map<String, String> getPushContext() { | ||
| return eventContext; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package OneQ.OnSurvey.global.common.event.pushAlim; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public interface PushAlimEvent { | ||
| Long getTargetUserKey(); | ||
| String getPushTemplateName(); | ||
| Map<String, String> getPushContext(); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package OneQ.OnSurvey.global.infra.discord.notifier.dto; | ||
|
|
||
| public record PushAlimAlert( | ||
| long userKey, | ||
| String templateSetCode, | ||
| long completedCount, | ||
| long failedCount, | ||
| String errorReason | ||
| ) { | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||||||||||
| package OneQ.OnSurvey.global.infra.toss.common.dto.push; | ||||||||||||||
|
|
||||||||||||||
| public record PushResultResponse ( | ||||||||||||||
| Long sentPushCount, | ||||||||||||||
| String sentPushContent | ||||||||||||||
| ) { | ||||||||||||||
|
|
||||||||||||||
| public static PushResultResponse of(Long sentPushCount, String sentPushContentId) { | ||||||||||||||
| return new PushResultResponse(sentPushCount, sentPushContentId); | ||||||||||||||
| } | ||||||||||||||
|
||||||||||||||
| public static PushResultResponse of(Long sentPushCount, String sentPushContentId) { | |
| return new PushResultResponse(sentPushCount, sentPushContentId); | |
| } | |
| public static PushResultResponse of(Long sentPushCount, String sentPushContent) { | |
| return new PushResultResponse(sentPushCount, sentPushContent); | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@src/main/java/OneQ/OnSurvey/global/infra/toss/common/dto/push/PushResultResponse.java`
around lines 8 - 10, The factory method PushResultResponse.of(...) uses
parameter name sentPushContentId which doesn't match the actual field
sentPushContent and the JSON string passed from TossApiClient; rename the
parameter in of(Long sentPushCount, String sentPushContentId) to sentPushContent
(or vice versa rename the field) so names reflect the same data, and update the
constructor invocation inside of(...) to pass the renamed parameter to the
PushResultResponse(...) constructor (ensure PushResultResponse.of, its parameter
list, and any callers use the new name consistently).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package OneQ.OnSurvey.global.infra.toss.common.dto.push; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public record PushTemplateAddRequest( | ||
| @Schema(description = "메시지 템플릿 이름 (이벤트 클래스 명)", example = "SurveyCompletedEvent") | ||
| String name, | ||
|
|
||
| @Schema(description = "발송할 메시지 템플릿 코드", example = "test_01") | ||
| String code, | ||
|
|
||
| @Schema( | ||
| description = "템플릿에서 사용할 기본 context 값. key는 템플릿에서 사용할 변수명, value는 해당 변수에 들어갈 기본값(index 0)과 설명(index 1)을 담은 리스트", | ||
| example = "{" + | ||
| "\"surveyTitle\": [\"기본 설문 제목\", \"설문 제목에 들어갈 기본 변수값\"], " + | ||
| "\"surveyDeadline\": [\"2024-12-31\", null]" + | ||
| "}" | ||
| ) | ||
| Map<String, List<String>> defaultContext | ||
| ) { | ||
wonjuneee marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package OneQ.OnSurvey.global.infra.toss.common.dto.push; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public record PushTemplateModifyRequest( | ||
| @Schema(description = "발송할 메시지 템플릿 코드", example = "test_01") | ||
| String code, | ||
|
|
||
| @Schema( | ||
| description = "템플릿에서 사용할 기본 context 값. key는 템플릿에서 사용할 변수명, value는 해당 변수에 들어갈 기본값(index 0)과 설명(index 1)을 담은 리스트", | ||
| example = "{" + | ||
| "\"surveyTitle\": [\"기본 설문 제목\", \"설문 제목에 들어갈 기본 변수값\"], " + | ||
| "\"surveyDeadline\": [\"2024-12-31\", null]" + | ||
| "}" | ||
| ) | ||
| Map<String, List<String>> defaultContext | ||
| ) { | ||
wonjuneee marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.