-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 장르, 아티스트 구독 시 FCM 알림, 공연 연관 구독 FCM 알림 연동 (#16)
- Loading branch information
1 parent
4f1b1f3
commit 958c969
Showing
55 changed files
with
716 additions
and
201 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
app/api/subscription-api/src/main/java/org/example/SubscriptionMessage.java
This file contains 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 org.example; | ||
|
||
import org.example.service.dto.MultipleTargetMessageServiceRequest; | ||
import org.example.service.dto.SingleTargetMessageServiceRequest; | ||
|
||
public interface SubscriptionMessage { | ||
|
||
void send(SingleTargetMessageServiceRequest request); | ||
|
||
void send(MultipleTargetMessageServiceRequest request); | ||
|
||
} |
This file contains 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
17 changes: 17 additions & 0 deletions
17
app/api/subscription-api/src/main/java/org/example/listener/dto/ArtistMessageApiRequest.java
This file contains 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,17 @@ | ||
package org.example.listener.dto; | ||
|
||
import java.util.UUID; | ||
import org.example.service.dto.ArtistMessageServiceRequest; | ||
|
||
public record ArtistMessageApiRequest( | ||
UUID artistId, | ||
String artistName | ||
) { | ||
|
||
public ArtistMessageServiceRequest toServiceRequest() { | ||
return ArtistMessageServiceRequest.builder() | ||
.artistId(artistId) | ||
.artistName(artistName) | ||
.build(); | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
...ption-api/src/main/java/org/example/listener/dto/ArtistSubscriptionMessageApiRequest.java
This file contains 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,20 +1,19 @@ | ||
package org.example.listener.dto; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.service.dto.ArtistSubscriptionMessageServiceRequest; | ||
|
||
@Builder | ||
public record ArtistSubscriptionMessageApiRequest( | ||
String userFcmToken, | ||
List<UUID> artistIds | ||
List<ArtistMessageApiRequest> artists | ||
) { | ||
|
||
public ArtistSubscriptionMessageServiceRequest toServiceRequest() { | ||
return ArtistSubscriptionMessageServiceRequest.builder() | ||
.userFcmToken(userFcmToken) | ||
.artistIds(artistIds) | ||
.artists(artists.stream().map(ArtistMessageApiRequest::toServiceRequest).toList()) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/api/subscription-api/src/main/java/org/example/listener/dto/GenreMessageApiRequest.java
This file contains 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,17 @@ | ||
package org.example.listener.dto; | ||
|
||
import java.util.UUID; | ||
import org.example.service.dto.GenreMessageServiceRequest; | ||
|
||
public record GenreMessageApiRequest( | ||
UUID genreId, | ||
String genreName | ||
) { | ||
|
||
public GenreMessageServiceRequest toServiceRequest() { | ||
return GenreMessageServiceRequest.builder() | ||
.genreId(genreId) | ||
.genreName(genreName) | ||
.build(); | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
...iption-api/src/main/java/org/example/listener/dto/GenreSubscriptionMessageApiRequest.java
This file contains 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,20 +1,19 @@ | ||
package org.example.listener.dto; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.service.dto.GenreSubscriptionMessageServiceRequest; | ||
|
||
@Builder | ||
public record GenreSubscriptionMessageApiRequest( | ||
String userFcmToken, | ||
List<UUID> genreIds | ||
List<GenreMessageApiRequest> genres | ||
) { | ||
|
||
public GenreSubscriptionMessageServiceRequest toServiceRequest() { | ||
return GenreSubscriptionMessageServiceRequest.builder() | ||
.userFcmToken(userFcmToken) | ||
.genreIds(genreIds) | ||
.genres(genres.stream().map(GenreMessageApiRequest::toServiceRequest).toList()) | ||
.build(); | ||
} | ||
} |
This file contains 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
18 changes: 18 additions & 0 deletions
18
...i/subscription-api/src/main/java/org/example/service/dto/ArtistMessageServiceRequest.java
This file contains 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,18 @@ | ||
package org.example.service.dto; | ||
|
||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.dto.request.ArtistMessageDomainRequest; | ||
|
||
@Builder | ||
public record ArtistMessageServiceRequest( | ||
UUID artistId, | ||
String artistName | ||
) { | ||
public ArtistMessageDomainRequest toDomainRequest() { | ||
return ArtistMessageDomainRequest.builder() | ||
.artistId(artistId) | ||
.artistName(artistName) | ||
.build(); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
...on-api/src/main/java/org/example/service/dto/ArtistSubscriptionMessageServiceRequest.java
This file contains 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,20 +1,19 @@ | ||
package org.example.service.dto; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.dto.ArtistSubscriptionMessageDomainRequest; | ||
import org.example.dto.request.ArtistSubscriptionMessageDomainRequest; | ||
|
||
@Builder | ||
public record ArtistSubscriptionMessageServiceRequest( | ||
String userFcmToken, | ||
List<UUID> artistIds | ||
List<ArtistMessageServiceRequest> artists | ||
) { | ||
|
||
public ArtistSubscriptionMessageDomainRequest toDomainRequest() { | ||
return ArtistSubscriptionMessageDomainRequest.builder() | ||
.userFcmToken(userFcmToken) | ||
.artistIds(artistIds) | ||
.artists(artists.stream().map(ArtistMessageServiceRequest::toDomainRequest).toList()) | ||
.build(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...pi/subscription-api/src/main/java/org/example/service/dto/GenreMessageServiceRequest.java
This file contains 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,19 @@ | ||
package org.example.service.dto; | ||
|
||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.dto.request.GenreMessageDomainRequest; | ||
|
||
@Builder | ||
public record GenreMessageServiceRequest( | ||
UUID genreId, | ||
String genreName | ||
) { | ||
|
||
public GenreMessageDomainRequest toDomainRequest() { | ||
return GenreMessageDomainRequest.builder() | ||
.genreId(genreId) | ||
.genreName(genreName) | ||
.build(); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
...ion-api/src/main/java/org/example/service/dto/GenreSubscriptionMessageServiceRequest.java
This file contains 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,20 +1,19 @@ | ||
package org.example.service.dto; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.dto.GenreSubscriptionMessageDomainRequest; | ||
import org.example.dto.request.GenreSubscriptionMessageDomainRequest; | ||
|
||
@Builder | ||
public record GenreSubscriptionMessageServiceRequest( | ||
String userFcmToken, | ||
List<UUID> genreIds | ||
List<GenreMessageServiceRequest> genres | ||
) { | ||
|
||
public GenreSubscriptionMessageDomainRequest toDomainRequest() { | ||
return GenreSubscriptionMessageDomainRequest.builder() | ||
.userFcmToken(userFcmToken) | ||
.genreIds(genreIds) | ||
.genres(genres.stream().map(GenreMessageServiceRequest::toDomainRequest).toList()) | ||
.build(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...iption-api/src/main/java/org/example/service/dto/MultipleTargetMessageServiceRequest.java
This file contains 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,21 @@ | ||
package org.example.service.dto; | ||
|
||
import java.util.List; | ||
import lombok.Builder; | ||
import org.example.message.MessageParam; | ||
|
||
@Builder | ||
public record MultipleTargetMessageServiceRequest( | ||
List<String> fcmTokens, | ||
MessageParam message | ||
) { | ||
public static MultipleTargetMessageServiceRequest of( | ||
List<String> fcmTokens, | ||
MessageParam message | ||
) { | ||
return MultipleTargetMessageServiceRequest.builder() | ||
.fcmTokens(fcmTokens) | ||
.message(message) | ||
.build(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...cription-api/src/main/java/org/example/service/dto/SingleTargetMessageServiceRequest.java
This file contains 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,10 @@ | ||
package org.example.service.dto; | ||
|
||
import org.example.message.MessageParam; | ||
|
||
public record SingleTargetMessageServiceRequest( | ||
String fcmToken, | ||
MessageParam message | ||
) { | ||
|
||
} |
This file contains 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
21 changes: 21 additions & 0 deletions
21
.../ticketing-api/src/main/java/org/example/listener/dto/TicketingTimeMessageApiRequest.java
This file contains 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,21 @@ | ||
package org.example.listener.dto; | ||
|
||
import java.time.LocalDateTime; | ||
import lombok.Builder; | ||
import org.example.service.dto.request.TicketingTimeMessageServiceRequest; | ||
import org.example.vo.TicketingAlertTimeApiType; | ||
|
||
@Builder | ||
public record TicketingTimeMessageApiRequest( | ||
String alertAt, | ||
TicketingAlertTimeApiType time | ||
) { | ||
|
||
public TicketingTimeMessageServiceRequest toServiceRequest() { | ||
return TicketingTimeMessageServiceRequest.builder() | ||
.alertAt(LocalDateTime.parse(alertAt)) | ||
.time(time) | ||
.build(); | ||
} | ||
|
||
} |
This file contains 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 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.