parent
b04f35c2da
commit
b4cd489ee9
|
@ -141,7 +141,8 @@ class MemberService(
|
|||
role = member.role,
|
||||
messageNotice = member.notification?.message,
|
||||
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,
|
||||
uploadContent = request.uploadContent,
|
||||
message = request.message,
|
||||
audition = request.audition,
|
||||
member = member
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,5 +8,6 @@ data class GetMemberInfoResponse(
|
|||
val role: MemberRole,
|
||||
val messageNotice: Boolean?,
|
||||
val followingChannelLiveNotice: Boolean?,
|
||||
val followingChannelUploadContentNotice: Boolean?
|
||||
val followingChannelUploadContentNotice: Boolean?,
|
||||
val auditionNotice: Boolean?
|
||||
)
|
||||
|
|
|
@ -11,16 +11,23 @@ class MemberNotificationService(private val repository: MemberNotificationReposi
|
|||
live: Boolean? = null,
|
||||
uploadContent: Boolean? = null,
|
||||
message: Boolean? = null,
|
||||
audition: Boolean? = null,
|
||||
member: Member
|
||||
) {
|
||||
var notification = repository.getMemberNotification(memberId = member.id!!)
|
||||
if (notification == null) {
|
||||
notification = MemberNotification(uploadContent, live, message)
|
||||
notification = MemberNotification(
|
||||
uploadContent = uploadContent,
|
||||
live = live,
|
||||
message = message,
|
||||
audition = audition
|
||||
)
|
||||
notification.member = member
|
||||
repository.save(notification)
|
||||
} else {
|
||||
if (live != null) notification.live = live
|
||||
if (message != null) notification.message = message
|
||||
if (audition != null) notification.audition = audition
|
||||
if (uploadContent != null) notification.uploadContent = uploadContent
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,5 +3,6 @@ package kr.co.vividnext.sodalive.member.notification
|
|||
data class UpdateNotificationSettingRequest(
|
||||
val live: Boolean?,
|
||||
val message: Boolean?,
|
||||
val audition: Boolean?,
|
||||
val uploadContent: Boolean?
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue