From 1051846c5bcd41581579a7398b9226bdead274db Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 12 Sep 2024 23:51:28 +0900 Subject: [PATCH 01/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=8C=94=EB=A1=9C=EC=9A=B0=20API=20-=20=ED=8C=94?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20/=20=EC=96=B8=ED=8C=94=EB=A1=9C=EC=9A=B0?= =?UTF-8?q?=20/=20=EC=95=8C=EB=A6=BC=20=EB=B0=9B=EA=B8=B0=20/=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EB=B0=9B=EC=A7=80=20=EC=95=8A=EA=B8=B0=20=EB=A5=BC?= =?UTF-8?q?=20=EB=AA=A8=EB=91=90=20=EC=B2=98=EB=A6=AC=ED=95=A0=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/member/MemberController.kt | 9 ++++++++- .../co/vividnext/sodalive/member/MemberService.kt | 11 ++++++++--- .../member/following/CreatorFollowRequest.kt | 6 +++++- .../sodalive/member/following/CreatorFollowing.kt | 13 +++++++------ 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberController.kt index e3312d7..024981c 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberController.kt @@ -142,7 +142,14 @@ class MemberController(private val service: MemberService) { ) = run { if (member == null) throw SodaException("로그인 정보를 확인해주세요.") - ApiResponse.ok(service.creatorFollow(creatorId = request.creatorId, memberId = member.id!!)) + ApiResponse.ok( + service.creatorFollow( + creatorId = request.creatorId, + isNotify = request.isNotify ?: true, + isActive = request.isActive ?: true, + memberId = member.id!! + ) + ) } @PostMapping("/creator/unfollow") diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt index e1a96fc..38c143d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt @@ -331,7 +331,7 @@ class MemberService( } @Transactional - fun creatorFollow(creatorId: Long, memberId: Long) { + fun creatorFollow(creatorId: Long, isNotify: Boolean, isActive: Boolean, memberId: Long) { val creatorFollowing = creatorFollowingRepository.findByCreatorIdAndMemberId( creatorId = creatorId, memberId = memberId @@ -340,9 +340,14 @@ class MemberService( if (creatorFollowing == null) { val creator = repository.findByIdOrNull(creatorId) ?: throw SodaException("크리에이터 정보를 확인해주세요.") val member = repository.findByIdOrNull(memberId) ?: throw SodaException("로그인 정보를 확인해주세요.") - creatorFollowingRepository.save(CreatorFollowing(creator = creator, member = member)) + + val newCreatorFollowing = CreatorFollowing() + newCreatorFollowing.member = member + newCreatorFollowing.creator = creator + creatorFollowingRepository.save(newCreatorFollowing) } else { - creatorFollowing.isActive = true + creatorFollowing.isNotify = isNotify + creatorFollowing.isActive = isActive } } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowRequest.kt index 453004b..3c32f9a 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowRequest.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowRequest.kt @@ -1,3 +1,7 @@ package kr.co.vividnext.sodalive.member.following -data class CreatorFollowRequest(val creatorId: Long) +data class CreatorFollowRequest( + val creatorId: Long, + val isNotify: Boolean?, + val isActive: Boolean? +) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowing.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowing.kt index c0a3044..5165393 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowing.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/following/CreatorFollowing.kt @@ -8,16 +8,17 @@ import javax.persistence.JoinColumn import javax.persistence.ManyToOne @Entity -class CreatorFollowing( +data class CreatorFollowing( + var isNotify: Boolean = true, + var isActive: Boolean = true +) : BaseEntity() { // 유저가 알림받기 한 크리에이터 @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "creator_id", nullable = false) - var creator: Member, + var creator: Member? = null // 크리에이터를 알림받기 한 유저 @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "member_id", nullable = false) - var member: Member, - - var isActive: Boolean = true -) : BaseEntity() + var member: Member? = null +} From 10f484357c32134226eaad805a0b0247b6ce6788 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 13 Sep 2024 01:48:16 +0900 Subject: [PATCH 02/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=8C=94=EB=A1=9C=EC=9A=B0=20API=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EC=83=81=ED=83=9C=20=EC=88=98=EC=A0=95=20-=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=EA=B3=BC=20=ED=8C=94=EB=A1=9C=EC=9A=B0=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=AA=A8=EB=91=90=20true=20=EC=9D=BC=20?= =?UTF-8?q?=EB=95=8C=EB=A7=8C=20=EC=95=8C=EB=A6=BC=EC=9D=B4=20true?= =?UTF-8?q?=EA=B0=80=20=EB=90=98=EA=B3=A0=20=EB=91=98=20=EC=A4=91=20?= =?UTF-8?q?=ED=95=98=EB=82=98=EB=9D=BC=EB=8F=84=20false=EC=9D=B4=EB=A9=B4?= =?UTF-8?q?=20false=EA=B0=80=20=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/kr/co/vividnext/sodalive/member/MemberService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt index 38c143d..82896e4 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt @@ -346,7 +346,7 @@ class MemberService( newCreatorFollowing.creator = creator creatorFollowingRepository.save(newCreatorFollowing) } else { - creatorFollowing.isNotify = isNotify + creatorFollowing.isNotify = isNotify && isActive creatorFollowing.isActive = isActive } } From 9516ce1c0faa03bdf590bbe0c480461065996076 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 13 Sep 2024 12:02:43 +0900 Subject: [PATCH 03/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=94=84=EB=A1=9C=ED=95=84=20API=20-=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=EA=B3=BC=20=ED=8C=94=EB=A1=9C=EC=9A=B0=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EA=B0=92=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/explorer/CreatorResponse.kt | 2 ++ .../sodalive/explorer/ExplorerQueryRepository.kt | 12 ++++++++++++ .../vividnext/sodalive/explorer/ExplorerService.kt | 6 ++++-- .../sodalive/explorer/GetCreatorFollowingResponse.kt | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/main/kotlin/kr/co/vividnext/sodalive/explorer/GetCreatorFollowingResponse.kt diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/CreatorResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/CreatorResponse.kt index c5b8f8b..1252cca 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/CreatorResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/CreatorResponse.kt @@ -10,6 +10,8 @@ data class CreatorResponse( val youtubeUrl: String? = null, val websiteUrl: String? = null, val blogUrl: String? = null, + val isFollow: Boolean, + val isNotify: Boolean, val isNotification: Boolean, val notificationRecipientCount: Int ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt index 766c7fa..8ba7e48 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt @@ -46,6 +46,18 @@ class ExplorerQueryRepository( @Value("\${cloud.aws.cloud-front.host}") private val cloudFrontHost: String ) { + fun getCreatorFollowing(creatorId: Long, memberId: Long): GetCreatorFollowingResponse { + return queryFactory + .select(QGetCreatorFollowingResponse(creatorFollowing.isActive, creatorFollowing.isNotify)) + .from(creatorFollowing) + .where( + creatorFollowing.isActive.isTrue + .and(creatorFollowing.creator.id.eq(creatorId)) + .and(creatorFollowing.member.id.eq(memberId)) + ) + .fetchFirst() + } + fun getNotificationUserIds(creatorId: Long): List { return queryFactory .select(creatorFollowing.member.id) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index f6c620f..e40e2b6 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -145,7 +145,7 @@ class ExplorerService( if (isBlocked) throw SodaException("${creatorAccount.nickname}님의 요청으로 채널 접근이 제한됩니다.") val notificationUserIds = queryRepository.getNotificationUserIds(creatorId) - val isNotification = notificationUserIds.contains(member.id) + val creatorFollowing = queryRepository.getCreatorFollowing(creatorId = creatorId, memberId = member.id!!) val notificationRecipientCount = notificationUserIds.size // 후원랭킹 @@ -223,7 +223,9 @@ class ExplorerService( youtubeUrl = creatorAccount.youtubeUrl, websiteUrl = creatorAccount.websiteUrl, blogUrl = creatorAccount.blogUrl, - isNotification = isNotification, + isFollow = creatorFollowing.isFollow, + isNotify = creatorFollowing.isNotify, + isNotification = creatorFollowing.isFollow, notificationRecipientCount = notificationRecipientCount ), userDonationRanking = memberDonationRanking, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/GetCreatorFollowingResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/GetCreatorFollowingResponse.kt new file mode 100644 index 0000000..2edb497 --- /dev/null +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/GetCreatorFollowingResponse.kt @@ -0,0 +1,5 @@ +package kr.co.vividnext.sodalive.explorer + +import com.querydsl.core.annotations.QueryProjection + +data class GetCreatorFollowingResponse @QueryProjection constructor(val isFollow: Boolean, val isNotify: Boolean) From 20938e7d43adacd146e39e2bd37dac6156a38af1 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 13 Sep 2024 12:21:07 +0900 Subject: [PATCH 04/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=94=84=EB=A1=9C=ED=95=84=20API=20-=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=EA=B3=BC=20=ED=8C=94=EB=A1=9C=EC=9A=B0=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EA=B0=92=20null=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/explorer/ExplorerQueryRepository.kt | 2 +- .../kr/co/vividnext/sodalive/explorer/ExplorerService.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt index 8ba7e48..9de8a29 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt @@ -46,7 +46,7 @@ class ExplorerQueryRepository( @Value("\${cloud.aws.cloud-front.host}") private val cloudFrontHost: String ) { - fun getCreatorFollowing(creatorId: Long, memberId: Long): GetCreatorFollowingResponse { + fun getCreatorFollowing(creatorId: Long, memberId: Long): GetCreatorFollowingResponse? { return queryFactory .select(QGetCreatorFollowingResponse(creatorFollowing.isActive, creatorFollowing.isNotify)) .from(creatorFollowing) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index e40e2b6..7ec998c 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -223,9 +223,9 @@ class ExplorerService( youtubeUrl = creatorAccount.youtubeUrl, websiteUrl = creatorAccount.websiteUrl, blogUrl = creatorAccount.blogUrl, - isFollow = creatorFollowing.isFollow, - isNotify = creatorFollowing.isNotify, - isNotification = creatorFollowing.isFollow, + isFollow = creatorFollowing?.isFollow ?: false, + isNotify = creatorFollowing?.isNotify ?: false, + isNotification = creatorFollowing?.isFollow ?: false, notificationRecipientCount = notificationRecipientCount ), userDonationRanking = memberDonationRanking, From fd3d596d5700a050d6734e1e128cd57da1551a7f Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 13 Sep 2024 19:24:40 +0900 Subject: [PATCH 05/13] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EC=83=81?= =?UTF-8?q?=EC=84=B8,=20=ED=8C=94=EB=A1=9C=EC=9E=89=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8,=20=EC=8B=9C=EB=A6=AC=EC=A6=88=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=20API=20-=20=EC=95=8C=EB=A6=BC=EA=B3=BC=20=ED=8C=94=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=EC=83=81=ED=83=9C=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/content/AudioContentService.kt | 10 +++++++--- .../sodalive/content/GetAudioContentDetailResponse.kt | 4 +++- .../sodalive/content/series/ContentSeriesService.kt | 5 +++-- .../sodalive/content/series/GetSeriesDetailResponse.kt | 3 ++- .../recommend/GetCreatorFollowingAllListResponse.kt | 7 +++++-- .../sodalive/live/recommend/LiveRecommendRepository.kt | 6 +++--- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt index 37445a0..7fa6d25 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt @@ -450,8 +450,10 @@ class AudioContentService( val creator = explorerQueryRepository.getMember(creatorId) ?: throw SodaException("없는 사용자 입니다.") - val notificationUserIds = explorerQueryRepository.getNotificationUserIds(creatorId) - val isFollowing = notificationUserIds.contains(member.id) + val creatorFollowing = explorerQueryRepository.getCreatorFollowing( + creatorId = creatorId, + memberId = member.id!! + ) // 구매 여부 확인 val isExistsBundleAudioContent = bundleAudioContentList @@ -640,7 +642,9 @@ class AudioContentService( } else { "$coverImageHost/profile/default-profile.png" }, - isFollowing = isFollowing + isFollowing = creatorFollowing?.isFollow ?: false, + isFollow = creatorFollowing?.isFollow ?: false, + isNotify = creatorFollowing?.isNotify ?: false ) ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/GetAudioContentDetailResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/GetAudioContentDetailResponse.kt index 77e5ea7..baf2cbc 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/GetAudioContentDetailResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/GetAudioContentDetailResponse.kt @@ -47,5 +47,7 @@ data class AudioContentCreator( val creatorId: Long, val nickname: String, val profileImageUrl: String, - val isFollowing: Boolean + val isFollowing: Boolean, + val isFollow: Boolean, + val isNotify: Boolean ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt index 665eb2e..86a0191 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt @@ -61,7 +61,7 @@ class ContentSeriesService( throw SodaException("잘못된 시리즈 입니다.\n다시 시도해 주세요") } - val isFollow = explorerQueryRepository.isFollow( + val creatorFollowing = explorerQueryRepository.getCreatorFollowing( creatorId = series.member!!.id!!, memberId = member.id!! ) @@ -102,7 +102,8 @@ class ContentSeriesService( creatorId = series.member!!.id!!, nickname = series.member!!.nickname, profileImage = "$coverImageHost/${series.member!!.profileImage}", - isFollow = isFollow + isFollow = creatorFollowing?.isFollow ?: false, + isNotice = creatorFollowing?.isNotify ?: false ), rentalMinPrice = rentalMinPrice, rentalMaxPrice = rentalMaxPrice, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt index 508c441..a827760 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt @@ -27,6 +27,7 @@ data class GetSeriesDetailResponse( val creatorId: Long, val nickname: String, val profileImage: String, - val isFollow: Boolean + val isFollow: Boolean, + val isNotice: Boolean ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/GetCreatorFollowingAllListResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/GetCreatorFollowingAllListResponse.kt index 2ae3bc4..286bdfc 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/GetCreatorFollowingAllListResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/GetCreatorFollowingAllListResponse.kt @@ -1,13 +1,16 @@ package kr.co.vividnext.sodalive.live.recommend +import com.querydsl.core.annotations.QueryProjection + data class GetCreatorFollowingAllListResponse( val totalCount: Int, val items: List ) -data class GetCreatorFollowingAllListItem( +data class GetCreatorFollowingAllListItem @QueryProjection constructor( val creatorId: Long, val nickname: String, val profileImageUrl: String, - val isFollow: Boolean + val isFollow: Boolean, + val isNotify: Boolean ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/LiveRecommendRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/LiveRecommendRepository.kt index 2032a5b..b3c3bf5 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/LiveRecommendRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/recommend/LiveRecommendRepository.kt @@ -239,12 +239,12 @@ class LiveRecommendRepository( return queryFactory .select( - Projections.constructor( - GetCreatorFollowingAllListItem::class.java, + QGetCreatorFollowingAllListItem( member.id, member.nickname, member.profileImage.prepend("/").prepend(cloudFrontHost), - Expressions.asBoolean(true) + Expressions.asBoolean(true), + creatorFollowing.isNotify ) ) .from(creatorFollowing) From a25b7d5cc22d51e0e4c314db16e2d6e97e969096 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 19 Sep 2024 16:36:55 +0900 Subject: [PATCH 06/13] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=9E=AD?= =?UTF-8?q?=ED=82=B9=20-=20=ED=95=9C=EC=A0=95=ED=8C=90=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/co/vividnext/sodalive/content/AudioContentRepository.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt index e15c24a..204d9d9 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt @@ -603,6 +603,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) .and(audioContent.member.role.eq(MemberRole.CREATOR)) .and(audioContent.duration.isNotNull) .and(audioContentTheme.isActive.isTrue) + .and(audioContent.limited.isNull) if (!isAdult) { where = where.and(audioContent.isAdult.isFalse) From dd0b751a43e04e0e6cfe9c4de78705db8d2fe389 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 00:56:27 +0900 Subject: [PATCH 07/13] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20-=20reposit?= =?UTF-8?q?ory=20=ED=98=B8=EC=B6=9C=20=EB=A9=94=EC=86=8C=EB=93=9C=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=EB=A1=9C=20?= =?UTF-8?q?=EB=84=98=EA=B8=B0=EB=8D=98=20cloudFrontHost=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/live/room/LiveRoomController.kt | 2 +- .../sodalive/live/room/LiveRoomRepository.kt | 16 +++++++++++----- .../sodalive/live/room/LiveRoomService.kt | 6 +++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt index 18c3a01..e37f38f 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt @@ -232,7 +232,7 @@ class LiveRoomController( ) = run { if (member == null) throw SodaException("로그인 정보를 확인해주세요.") - ApiResponse.ok(service.getDonationStatus(roomId, member)) + ApiResponse.ok(service.getDonationStatus(roomId)) } @PostMapping("/quit") diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt index c4aeac8..7526bf7 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt @@ -11,6 +11,7 @@ import kr.co.vividnext.sodalive.live.room.QQuarterLiveRankings.quarterLiveRankin import kr.co.vividnext.sodalive.live.room.donation.GetLiveRoomDonationItem import kr.co.vividnext.sodalive.live.room.donation.QGetLiveRoomDonationItem import kr.co.vividnext.sodalive.member.QMember.member +import org.springframework.beans.factory.annotation.Value import org.springframework.data.jpa.repository.JpaRepository import org.springframework.stereotype.Repository import java.time.LocalDateTime @@ -47,13 +48,18 @@ interface LiveRoomQueryRepository { fun getLiveRoom(id: Long): LiveRoom? fun getLiveRoomAndAccountId(roomId: Long, memberId: Long): LiveRoom? - fun getRecentRoomInfo(memberId: Long, cloudFrontHost: String): GetRecentRoomInfoResponse? + fun getRecentRoomInfo(memberId: Long): GetRecentRoomInfoResponse? fun getDonationTotal(roomId: Long): Int? - fun getDonationList(roomId: Long, cloudFrontHost: String): List + fun getDonationList(roomId: Long): List fun getRoomActiveAndChannelNameIsNotNull(memberId: Long): List } -class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : LiveRoomQueryRepository { +class LiveRoomQueryRepositoryImpl( + private val queryFactory: JPAQueryFactory, + + @Value("\${cloud.aws.cloud-front.host}") + private val cloudFrontHost: String +) : LiveRoomQueryRepository { override fun getLiveRoomListNow( offset: Long, limit: Long, @@ -200,7 +206,7 @@ class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : L .fetchFirst() } - override fun getRecentRoomInfo(memberId: Long, cloudFrontHost: String): GetRecentRoomInfoResponse? { + override fun getRecentRoomInfo(memberId: Long): GetRecentRoomInfoResponse? { return queryFactory .select( Projections.constructor( @@ -234,7 +240,7 @@ class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : L .fetchOne() } - override fun getDonationList(roomId: Long, cloudFrontHost: String): List { + override fun getDonationList(roomId: Long): List { return queryFactory .select( QGetLiveRoomDonationItem( diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt index 02c9b7e..0e1621b 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt @@ -690,7 +690,7 @@ class LiveRoomService( } fun getRecentRoomInfo(member: Member): GetRecentRoomInfoResponse { - return repository.getRecentRoomInfo(memberId = member.id!!, cloudFrontHost = cloudFrontHost) + return repository.getRecentRoomInfo(memberId = member.id!!) ?: throw SodaException("최근 데이터가 없습니다.") } @@ -1166,9 +1166,9 @@ class LiveRoomService( } } - fun getDonationStatus(roomId: Long, member: Member): GetLiveRoomDonationStatusResponse { + fun getDonationStatus(roomId: Long): GetLiveRoomDonationStatusResponse { val room = repository.getLiveRoom(roomId) ?: throw SodaException("잘못된 요청입니다.") - val donationList = repository.getDonationList(roomId = room.id!!, cloudFrontHost = cloudFrontHost) + val donationList = repository.getDonationList(roomId = room.id!!) val totalCan = donationList.sumOf { it.can } return GetLiveRoomDonationStatusResponse( From 2c4c19990a693ad5b93f4cbe4804a2aa3250d63d Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 01:04:02 +0900 Subject: [PATCH 08/13] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20-=20?= =?UTF-8?q?=ED=9B=84=EC=9B=90=ED=98=84=ED=99=A9=20API=20-=20=EB=B0=A9?= =?UTF-8?q?=EC=9E=A5=EC=9D=80=20=EB=B9=84=EB=B0=80=ED=9B=84=EC=9B=90=20?= =?UTF-8?q?=EB=82=B4=EC=97=AD=EB=8F=84=20=EB=B0=98=EC=98=81=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/live/room/LiveRoomController.kt | 4 +- .../sodalive/live/room/LiveRoomRepository.kt | 38 +++++++++++-------- .../sodalive/live/room/LiveRoomService.kt | 12 ++++-- 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt index e37f38f..43ab9f6 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomController.kt @@ -162,7 +162,7 @@ class LiveRoomController( ) = run { if (member == null) throw SodaException("로그인 정보를 확인해주세요.") - ApiResponse.ok(service.getDonationTotal(roomId)) + ApiResponse.ok(service.getDonationTotal(roomId, memberId = member.id!!)) } @PutMapping("/info/set/speaker") @@ -232,7 +232,7 @@ class LiveRoomController( ) = run { if (member == null) throw SodaException("로그인 정보를 확인해주세요.") - ApiResponse.ok(service.getDonationStatus(roomId)) + ApiResponse.ok(service.getDonationStatus(roomId, memberId = member.id!!)) } @PostMapping("/quit") diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt index 7526bf7..2667915 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomRepository.kt @@ -49,8 +49,8 @@ interface LiveRoomQueryRepository { fun getLiveRoom(id: Long): LiveRoom? fun getLiveRoomAndAccountId(roomId: Long, memberId: Long): LiveRoom? fun getRecentRoomInfo(memberId: Long): GetRecentRoomInfoResponse? - fun getDonationTotal(roomId: Long): Int? - fun getDonationList(roomId: Long): List + fun getDonationTotal(roomId: Long, isLiveCreator: Boolean): Int? + fun getDonationList(roomId: Long, isLiveCreator: Boolean): List fun getRoomActiveAndChannelNameIsNotNull(memberId: Long): List } @@ -225,22 +225,33 @@ class LiveRoomQueryRepositoryImpl( .fetchFirst() } - override fun getDonationTotal(roomId: Long): Int? { + override fun getDonationTotal(roomId: Long, isLiveCreator: Boolean): Int? { + var where = liveRoom.id.eq(roomId) + .and(useCan.canUsage.eq(CanUsage.DONATION).or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))) + .and(useCan.isRefund.isFalse) + + if (!isLiveCreator) { + where = where.and(useCan.isSecret.isFalse) + } + return queryFactory .select(useCanCalculate.can.sum()) .from(useCanCalculate) .innerJoin(useCanCalculate.useCan, useCan) .innerJoin(useCan.room, liveRoom) - .where( - liveRoom.id.eq(roomId) - .and(useCan.canUsage.eq(CanUsage.DONATION).or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))) - .and(useCan.isRefund.isFalse) - .and(useCan.isSecret.isFalse) - ) + .where(where) .fetchOne() } - override fun getDonationList(roomId: Long): List { + override fun getDonationList(roomId: Long, isLiveCreator: Boolean): List { + var where = liveRoom.id.eq(roomId) + .and(useCan.canUsage.eq(CanUsage.DONATION).or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))) + .and(useCan.isRefund.isFalse) + + if (!isLiveCreator) { + where = where.and(useCan.isSecret.isFalse) + } + return queryFactory .select( QGetLiveRoomDonationItem( @@ -256,12 +267,7 @@ class LiveRoomQueryRepositoryImpl( .from(useCan) .join(useCan.member, member) .groupBy(useCan.member) - .where( - useCan.room.id.eq(roomId) - .and(useCan.canUsage.eq(CanUsage.DONATION).or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))) - .and(useCan.isRefund.isFalse) - .and(useCan.isSecret.isFalse) - ) + .where(where) .orderBy(useCan.can.sum().add(useCan.rewardCan.sum()).desc()) .fetch() } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt index 0e1621b..7b83ab8 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt @@ -965,9 +965,12 @@ class LiveRoomService( ) } - fun getDonationTotal(roomId: Long): GetLiveRoomDonationTotalResponse { + fun getDonationTotal(roomId: Long, memberId: Long): GetLiveRoomDonationTotalResponse { + val room = repository.getLiveRoom(roomId) + ?: return GetLiveRoomDonationTotalResponse(0) + val isLiveCreator = room.member!!.id == memberId return GetLiveRoomDonationTotalResponse( - totalDonationCan = repository.getDonationTotal(roomId = roomId) ?: 0 + totalDonationCan = repository.getDonationTotal(roomId = roomId, isLiveCreator = isLiveCreator) ?: 0 ) } @@ -1166,9 +1169,10 @@ class LiveRoomService( } } - fun getDonationStatus(roomId: Long): GetLiveRoomDonationStatusResponse { + fun getDonationStatus(roomId: Long, memberId: Long): GetLiveRoomDonationStatusResponse { val room = repository.getLiveRoom(roomId) ?: throw SodaException("잘못된 요청입니다.") - val donationList = repository.getDonationList(roomId = room.id!!) + val isLiveCreator = room.member!!.id == memberId + val donationList = repository.getDonationList(roomId = room.id!!, isLiveCreator = isLiveCreator) val totalCan = donationList.sumOf { it.can } return GetLiveRoomDonationStatusResponse( From 0c153aeb6a6742f7e5d02de7474f84bc1e387f80 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 01:10:29 +0900 Subject: [PATCH 09/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=82=B4=20=EC=B1=84=EB=84=90=20-=20=ED=8C=94?= =?UTF-8?q?=EB=A1=9C=EC=9B=8C=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=EC=84=A4=EC=A0=95=20=EC=97=AC=EB=B6=80=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/vividnext/sodalive/explorer/ExplorerService.kt | 10 +++++++--- .../explorer/follower/GetFollowerListResponse.kt | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index 7ec998c..4a905dd 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -307,8 +307,11 @@ class ExplorerService( val followerList = queryRepository.getFollowerList(creatorId, pageable.offset, pageable.pageSize.toLong()) .map { - val isFollow = if (it.role == MemberRole.CREATOR) { - queryRepository.isFollow(creatorId = it.userId, memberId = member.id!!) + val creatorFollowing = if (it.role == MemberRole.CREATOR) { + queryRepository.getCreatorFollowing( + creatorId = it.userId, + memberId = member.id!! + ) } else { null } @@ -317,7 +320,8 @@ class ExplorerService( userId = it.userId, profileImage = it.profileImage, nickname = it.nickname, - isFollow = isFollow + isFollow = creatorFollowing?.isFollow ?: false, + isNotify = creatorFollowing?.isNotify ?: false ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt index d7ef0ec..caa46e5 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt @@ -9,5 +9,6 @@ data class GetFollowerListResponseItem( val userId: Long, val profileImage: String, val nickname: String, - val isFollow: Boolean? + val isFollow: Boolean?, + val isNotify: Boolean? ) From 9f848e1bdc001bce5fc54596c97c08f05634ba59 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 01:20:23 +0900 Subject: [PATCH 10/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=82=B4=20=EC=B1=84=EB=84=90=20-=20=ED=8C=94?= =?UTF-8?q?=EB=A1=9C=EC=9B=8C=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=EC=84=A4=EC=A0=95=20=EC=97=AC=EB=B6=80=20nul?= =?UTF-8?q?l=EC=9D=B4=20=EB=93=A4=EC=96=B4=EA=B0=80=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/co/vividnext/sodalive/explorer/ExplorerService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index 4a905dd..4d3c6fb 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -320,8 +320,8 @@ class ExplorerService( userId = it.userId, profileImage = it.profileImage, nickname = it.nickname, - isFollow = creatorFollowing?.isFollow ?: false, - isNotify = creatorFollowing?.isNotify ?: false + isFollow = creatorFollowing?.isFollow, + isNotify = creatorFollowing?.isNotify ) } From 2a70a7824f2b256430852e5d1314504d47c66fc0 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 01:27:37 +0900 Subject: [PATCH 11/13] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=82=B4=20=EC=B1=84=EB=84=90=20-=20=ED=8C=94?= =?UTF-8?q?=EB=A1=9C=EC=9B=8C=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20?= =?UTF-8?q?=ED=8C=94=EB=A1=9C=EC=9A=B0/=EC=95=8C=EB=9E=8C=20=EC=97=AC?= =?UTF-8?q?=EB=B6=80=20-=20=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=EC=9D=B4=EB=A9=B4=20=ED=95=AD=EC=83=81=20Boolean=20=EA=B0=92?= =?UTF-8?q?=EC=9D=84=20=EB=B0=98=ED=99=98=ED=95=98=EA=B3=A0=20=EC=9D=BC?= =?UTF-8?q?=EB=B0=98=EC=9C=A0=EC=A0=80=EB=A9=B4=20null=EC=9D=84=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/explorer/ExplorerService.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index 4d3c6fb..5286adf 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -320,8 +320,16 @@ class ExplorerService( userId = it.userId, profileImage = it.profileImage, nickname = it.nickname, - isFollow = creatorFollowing?.isFollow, - isNotify = creatorFollowing?.isNotify + isFollow = creatorFollowing?.isFollow ?: if (it.role == MemberRole.CREATOR) { + false + } else { + null + }, + isNotify = creatorFollowing?.isNotify ?: if (it.role == MemberRole.CREATOR) { + false + } else { + null + } ) } From 738f1ea9fe9476ad8828b02d5edf1c19d393174a Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 12:04:17 +0900 Subject: [PATCH 12/13] =?UTF-8?q?isNotice=20->=20isNotify=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/content/series/ContentSeriesService.kt | 2 +- .../sodalive/content/series/GetSeriesDetailResponse.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt index 86a0191..6857adf 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt @@ -103,7 +103,7 @@ class ContentSeriesService( nickname = series.member!!.nickname, profileImage = "$coverImageHost/${series.member!!.profileImage}", isFollow = creatorFollowing?.isFollow ?: false, - isNotice = creatorFollowing?.isNotify ?: false + isNotify = creatorFollowing?.isNotify ?: false ), rentalMinPrice = rentalMinPrice, rentalMaxPrice = rentalMaxPrice, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt index a827760..7b9daac 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/GetSeriesDetailResponse.kt @@ -28,6 +28,6 @@ data class GetSeriesDetailResponse( val nickname: String, val profileImage: String, val isFollow: Boolean, - val isNotice: Boolean + val isNotify: Boolean ) } From 7204acb2bbc2df766729943f1aaf5e70f8aa36af Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 12:34:12 +0900 Subject: [PATCH 13/13] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1/=EC=8B=9C=EC=9E=91,=20=EC=BD=98=ED=85=90=EC=B8=A0=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C,=20=EC=BB=A4=EB=AE=A4=EB=8B=88?= =?UTF-8?q?=ED=8B=B0=20=EA=B8=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20-=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=EC=9D=84=20=ED=97=88=EC=9A=A9=ED=95=9C=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=EB=A7=8C=20=ED=91=B8=EC=8B=9C=EB=A5=BC=20?= =?UTF-8?q?=EB=B0=9B=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/co/vividnext/sodalive/member/MemberRepository.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt index 57c9eca..51f3bd1 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt @@ -146,6 +146,7 @@ class MemberQueryRepositoryImpl( ) ) .and(creatorFollowing.member.pushToken.isNotNull) + .and(creatorFollowing.isNotify.isTrue) .or(member.id.eq(4).and(member.pushToken.isNotNull)) if (isAuth) { @@ -190,6 +191,7 @@ class MemberQueryRepositoryImpl( ) ) .and(creatorFollowing.member.pushToken.isNotNull) + .and(creatorFollowing.isNotify.isTrue) .or(creatorFollowing.member.id.eq(4).and(member.pushToken.isNotNull)) if (isAuth) { @@ -259,6 +261,7 @@ class MemberQueryRepositoryImpl( ) ) .and(creatorFollowing.member.pushToken.isNotNull) + .and(creatorFollowing.isNotify.isTrue) .or(member.id.eq(4).and(member.pushToken.isNotNull)) if (isAuth) { @@ -372,6 +375,7 @@ class MemberQueryRepositoryImpl( ) ) .and(creatorFollowing.member.pushToken.isNotNull) + .and(creatorFollowing.isNotify.isTrue) val aosPushTokens = queryFactory .select(creatorFollowing.member.pushToken)