오디션 수정
- 오디션 상태를 모집중으로 변경시 오디션 알림 받기가 되어 있는 유저에게 푸시 발송
This commit is contained in:
@@ -56,6 +56,7 @@ interface MemberQueryRepository {
|
||||
|
||||
fun getChangeNoticeRecipientPushTokens(creatorId: Long): Map<String, List<List<String>>>
|
||||
fun getPushTokenFromReservationList(roomId: Long): Map<String, List<List<String>>>
|
||||
fun getAuditionNoticeRecipientPushTokens(isAuth: Boolean): Map<String, List<List<String>>>
|
||||
|
||||
fun getMemberProfile(memberId: Long, myMemberId: Long): GetMemberProfileResponse
|
||||
}
|
||||
@@ -427,6 +428,37 @@ class MemberQueryRepositoryImpl(
|
||||
return mapOf("aos" to aosPushTokens, "ios" to iosPushTokens)
|
||||
}
|
||||
|
||||
override fun getAuditionNoticeRecipientPushTokens(isAuth: Boolean): Map<String, List<List<String>>> {
|
||||
var where = memberNotification.audition.isTrue
|
||||
.and(member.pushToken.isNotNull)
|
||||
|
||||
if (isAuth) {
|
||||
where = where.and(auth.isNotNull)
|
||||
}
|
||||
|
||||
val aosPushTokens = queryFactory
|
||||
.select(member.pushToken)
|
||||
.from(member)
|
||||
.leftJoin(member.auth, auth)
|
||||
.leftJoin(memberNotification).on(memberNotification.member.id.eq(member.id))
|
||||
.where(where.and(member.container.eq("aos")))
|
||||
.fetch()
|
||||
.toSet()
|
||||
.chunked(500)
|
||||
|
||||
val iosPushTokens = queryFactory
|
||||
.select(member.pushToken)
|
||||
.from(member)
|
||||
.leftJoin(member.auth, auth)
|
||||
.leftJoin(memberNotification).on(memberNotification.member.id.eq(member.id))
|
||||
.where(where.and(member.container.eq("ios")))
|
||||
.fetch()
|
||||
.toSet()
|
||||
.chunked(500)
|
||||
|
||||
return mapOf("aos" to aosPushTokens, "ios" to iosPushTokens)
|
||||
}
|
||||
|
||||
override fun getMemberProfile(memberId: Long, myMemberId: Long): GetMemberProfileResponse {
|
||||
return queryFactory
|
||||
.select(
|
||||
|
@@ -17,7 +17,10 @@ data class MemberNotification(
|
||||
var live: Boolean? = true,
|
||||
|
||||
@Column(nullable = false)
|
||||
var message: Boolean? = true
|
||||
var message: Boolean? = true,
|
||||
|
||||
@Column(nullable = false)
|
||||
var audition: Boolean? = false
|
||||
) : BaseEntity() {
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "member_id", nullable = false)
|
||||
|
Reference in New Issue
Block a user