푸시정보

- 오디션 알림 추가
This commit is contained in:
Klaus 2025-01-08 17:45:50 +09:00
parent b04f35c2da
commit b4cd489ee9
4 changed files with 14 additions and 3 deletions

View File

@ -141,7 +141,8 @@ class MemberService(
role = member.role, role = member.role,
messageNotice = member.notification?.message, messageNotice = member.notification?.message,
followingChannelLiveNotice = member.notification?.live, followingChannelLiveNotice = member.notification?.live,
followingChannelUploadContentNotice = member.notification?.uploadContent followingChannelUploadContentNotice = member.notification?.uploadContent,
auditionNotice = member.notification?.audition
) )
} }
@ -151,6 +152,7 @@ class MemberService(
live = request.live, live = request.live,
uploadContent = request.uploadContent, uploadContent = request.uploadContent,
message = request.message, message = request.message,
audition = request.audition,
member = member member = member
) )
} }

View File

@ -8,5 +8,6 @@ data class GetMemberInfoResponse(
val role: MemberRole, val role: MemberRole,
val messageNotice: Boolean?, val messageNotice: Boolean?,
val followingChannelLiveNotice: Boolean?, val followingChannelLiveNotice: Boolean?,
val followingChannelUploadContentNotice: Boolean? val followingChannelUploadContentNotice: Boolean?,
val auditionNotice: Boolean?
) )

View File

@ -11,16 +11,23 @@ class MemberNotificationService(private val repository: MemberNotificationReposi
live: Boolean? = null, live: Boolean? = null,
uploadContent: Boolean? = null, uploadContent: Boolean? = null,
message: Boolean? = null, message: Boolean? = null,
audition: Boolean? = null,
member: Member member: Member
) { ) {
var notification = repository.getMemberNotification(memberId = member.id!!) var notification = repository.getMemberNotification(memberId = member.id!!)
if (notification == null) { if (notification == null) {
notification = MemberNotification(uploadContent, live, message) notification = MemberNotification(
uploadContent = uploadContent,
live = live,
message = message,
audition = audition
)
notification.member = member notification.member = member
repository.save(notification) repository.save(notification)
} else { } else {
if (live != null) notification.live = live if (live != null) notification.live = live
if (message != null) notification.message = message if (message != null) notification.message = message
if (audition != null) notification.audition = audition
if (uploadContent != null) notification.uploadContent = uploadContent if (uploadContent != null) notification.uploadContent = uploadContent
} }
} }

View File

@ -3,5 +3,6 @@ package kr.co.vividnext.sodalive.member.notification
data class UpdateNotificationSettingRequest( data class UpdateNotificationSettingRequest(
val live: Boolean?, val live: Boolean?,
val message: Boolean?, val message: Boolean?,
val audition: Boolean?,
val uploadContent: Boolean? val uploadContent: Boolean?
) )