From 88520dbc7f41741e6ec1e65bf817a831349ed8b4 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 31 Aug 2023 19:45:38 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=B0=A8?= =?UTF-8?q?=EB=8B=A8=20=ED=95=B4=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= 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 42e33c2..9b788bc 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberService.kt @@ -376,7 +376,7 @@ class MemberService( ) if (blockMember != null) { - blockMember.isActive = true + blockMember.isActive = false } } -- 2.40.1 From 8f50d05906d6d95e4116fdfbf498fa49300c0fe2 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 31 Aug 2023 19:49:05 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=EC=B6=94=EC=B2=9C=EC=B1=84=EB=84=90,=20?= =?UTF-8?q?=ED=8C=94=EB=A1=9C=EC=9E=89=20=EC=B1=84=EB=84=90=20API=20-=20?= =?UTF-8?q?=EB=82=98=EB=A5=BC=20=EC=B0=A8=EB=8B=A8=ED=95=9C=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EB=8A=94=20=ED=91=9C=EC=8B=9C=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=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/recommend/LiveRecommendRepository.kt | 6 ++++++ 1 file changed, 6 insertions(+) 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 0f147df..e6ece32 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 @@ -113,6 +113,9 @@ class LiveRecommendRepository( .orderBy(Expressions.numberTemplate(Double::class.java, "function('rand')").asc()) .limit(limit) .fetch() + .asSequence() + .filter { !isBlocked(it.creatorId) } + .toList() } fun getOnAirFollowingChannelList( @@ -188,6 +191,9 @@ class LiveRecommendRepository( .orderBy(Expressions.numberTemplate(Double::class.java, "function('rand')").asc()) .limit(limit) .fetch() + .asSequence() + .filter { !isBlocked(it.creatorId) } + .toList() } fun getCreatorFollowingAllListTotalCount(memberId: Long, isBlocked: (Long) -> Boolean): Int { -- 2.40.1 From d6dfa63beae5ca30a3e98f6a76fc000a40a9c86f Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 1 Sep 2023 16:46:43 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C=20=ED=91=B8=EC=8B=9C=20=EB=B0=9C=EC=86=A1=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/co/vividnext/sodalive/fcm/FcmEvent.kt | 34 ++++++++++++++++++- .../sodalive/live/room/LiveRoomService.kt | 9 +++++ .../sodalive/member/MemberRepository.kt | 34 +++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt b/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt index e766c32..ad25846 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt @@ -9,7 +9,8 @@ import org.springframework.transaction.annotation.Transactional import org.springframework.transaction.event.TransactionalEventListener enum class FcmEventType { - ALL, INDIVIDUAL, CREATE_LIVE, START_LIVE, UPLOAD_CONTENT, SEND_MESSAGE, CHANGE_NOTICE, CREATE_CONTENT_COMMENT + ALL, INDIVIDUAL, CREATE_LIVE, START_LIVE, CANCEL_LIVE, UPLOAD_CONTENT, SEND_MESSAGE, CHANGE_NOTICE, + CREATE_CONTENT_COMMENT } class FcmEvent( @@ -131,6 +132,37 @@ class FcmSendListener( } } + FcmEventType.CANCEL_LIVE -> { + if (fcmEvent.roomId != null) { + val pushTokenList = memberRepository.getPushTokenFromReservationList(fcmEvent.roomId) + + val iosPushTokens = pushTokenList["ios"] + val aosPushToken = pushTokenList["aos"] + + if (iosPushTokens != null) { + for (tokens in iosPushTokens) { + pushService.send( + tokens = tokens, + title = fcmEvent.title, + message = fcmEvent.message, + container = "ios" + ) + } + } + + if (aosPushToken != null) { + for (tokens in aosPushToken) { + pushService.send( + tokens = tokens, + title = fcmEvent.title, + message = fcmEvent.message, + container = "aos" + ) + } + } + } + } + FcmEventType.UPLOAD_CONTENT -> { if (fcmEvent.container.isNotBlank()) { val pushTokens = memberRepository.getUploadContentNotificationRecipientPushTokens( 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 b470dd1..647377a 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 @@ -475,6 +475,15 @@ class LiveRoomService( } reservationRepository.cancelReservation(roomId = room.id!!) + + applicationEventPublisher.publishEvent( + FcmEvent( + type = FcmEventType.CANCEL_LIVE, + title = room.member!!.nickname, + message = "라이브 취소 : ${room.title}", + roomId = request.roomId + ) + ) } @Transactional 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 3a60039..6d8c0cf 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt @@ -50,6 +50,7 @@ interface MemberQueryRepository { fun getMemberByEmail(email: String): Member? fun getChangeNoticeRecipientPushTokens(creatorId: Long): Map>> + fun getPushTokenFromReservationList(roomId: Long): Map>> } @Repository @@ -255,9 +256,11 @@ class MemberQueryRepositoryImpl( ) .from(message) .innerJoin(message.recipient, member) + .innerJoin(member.notification, memberNotification) .where( message.id.eq(messageId) .and(member.pushToken.isNotNull) + .and(memberNotification.message.isTrue) ) .fetchFirst() } @@ -356,4 +359,35 @@ class MemberQueryRepositoryImpl( return mapOf("aos" to aosPushTokens, "ios" to iosPushTokens) } + + override fun getPushTokenFromReservationList(roomId: Long): Map>> { + val query = queryFactory + .select(liveReservation.member.pushToken) + .from(liveReservation) + .innerJoin(liveReservation.room, liveRoom) + .innerJoin(liveReservation.member, member) + + val where = liveRoom.id.eq(roomId) + .and(liveReservation.isActive.isTrue) + + val aosPushTokens = query + .where( + where + .and(member.container.eq("aos")) + ) + .fetch() + .toSet() + .chunked(500) + + val iosPushTokens = query + .where( + where + .and(member.container.eq("ios")) + ) + .fetch() + .toSet() + .chunked(500) + + return mapOf("aos" to aosPushTokens, "ios" to iosPushTokens) + } } -- 2.40.1 From 896246d9edc7ec644c493ccc8e40b86073f5e86a Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 1 Sep 2023 17:13:32 +0900 Subject: [PATCH 04/10] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C=20=ED=91=B8=EC=8B=9C=20=EB=B0=9C=EC=86=A1=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt | 10 ++++------ .../co/vividnext/sodalive/live/room/LiveRoomService.kt | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt b/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt index ad25846..bd8d174 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/fcm/FcmEvent.kt @@ -19,6 +19,7 @@ class FcmEvent( val message: String, val container: String = "", val recipients: List = listOf(), + val recipientsMap: Map>>? = null, val isAuth: Boolean = false, val roomId: Long? = null, val contentId: Long? = null, @@ -133,12 +134,9 @@ class FcmSendListener( } FcmEventType.CANCEL_LIVE -> { - if (fcmEvent.roomId != null) { - val pushTokenList = memberRepository.getPushTokenFromReservationList(fcmEvent.roomId) - - val iosPushTokens = pushTokenList["ios"] - val aosPushToken = pushTokenList["aos"] - + if (fcmEvent.recipientsMap != null) { + val iosPushTokens = fcmEvent.recipientsMap["ios"] + val aosPushToken = fcmEvent.recipientsMap["aos"] if (iosPushTokens != null) { for (tokens in iosPushTokens) { pushService.send( 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 647377a..576cdc7 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 @@ -474,6 +474,7 @@ class LiveRoomService( } } + val pushTokenListMap = memberRepository.getPushTokenFromReservationList(request.roomId) reservationRepository.cancelReservation(roomId = room.id!!) applicationEventPublisher.publishEvent( @@ -481,7 +482,7 @@ class LiveRoomService( type = FcmEventType.CANCEL_LIVE, title = room.member!!.nickname, message = "라이브 취소 : ${room.title}", - roomId = request.roomId + recipientsMap = pushTokenListMap ) ) } -- 2.40.1 From a285e30108fafd8779e36a41864da51da8068df9 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 1 Sep 2023 17:29:57 +0900 Subject: [PATCH 05/10] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C=20=ED=91=B8=EC=8B=9C=20=EB=B0=9C=EC=86=A1=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/member/MemberRepository.kt | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) 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 6d8c0cf..806240e 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/member/MemberRepository.kt @@ -361,29 +361,25 @@ class MemberQueryRepositoryImpl( } override fun getPushTokenFromReservationList(roomId: Long): Map>> { - val query = queryFactory + val where = liveRoom.id.eq(roomId) + .and(liveReservation.isActive.isTrue) + + val aosPushTokens = queryFactory .select(liveReservation.member.pushToken) .from(liveReservation) .innerJoin(liveReservation.room, liveRoom) .innerJoin(liveReservation.member, member) - - val where = liveRoom.id.eq(roomId) - .and(liveReservation.isActive.isTrue) - - val aosPushTokens = query - .where( - where - .and(member.container.eq("aos")) - ) + .where(where.and(member.container.eq("aos"))) .fetch() .toSet() .chunked(500) - val iosPushTokens = query - .where( - where - .and(member.container.eq("ios")) - ) + val iosPushTokens = queryFactory + .select(liveReservation.member.pushToken) + .from(liveReservation) + .innerJoin(liveReservation.room, liveRoom) + .innerJoin(liveReservation.member, member) + .where(where.and(member.container.eq("ios"))) .fetch() .toSet() .chunked(500) -- 2.40.1 From d2ae958847550804ada955f47c72930809f9a5eb Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 1 Sep 2023 18:40:45 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=98=88?= =?UTF-8?q?=EC=95=BD=ED=98=84=ED=99=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/live/reservation/LiveReservationRepository.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/reservation/LiveReservationRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/reservation/LiveReservationRepository.kt index 4191d46..b161730 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/reservation/LiveReservationRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/reservation/LiveReservationRepository.kt @@ -82,7 +82,8 @@ class LiveReservationQueryRepositoryImpl(private val queryFactory: JPAQueryFacto .innerJoin(liveReservation.member, member) .innerJoin(liveReservation.room, liveRoom) .where( - liveReservation.isActive.eq(active) + liveRoom.isActive.isTrue + .and(liveReservation.isActive.eq(active)) .and(member.id.eq(memberId)) ) .fetch() -- 2.40.1 From 7ca71f90dba94a36a33a5fdb71de74983043f917 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 3 Sep 2023 00:42:26 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=EB=A6=AC=EC=9B=8C=EB=93=9C=EC=BD=94?= =?UTF-8?q?=EC=9D=B8=20=EC=9E=98=EB=AA=BB=20=EC=8D=A8=EC=A7=80=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/can/payment/CanPaymentService.kt | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt index fd3a937..3d0c283 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt @@ -16,6 +16,7 @@ import kr.co.vividnext.sodalive.common.SodaException import kr.co.vividnext.sodalive.content.AudioContent import kr.co.vividnext.sodalive.content.order.Order import kr.co.vividnext.sodalive.live.room.LiveRoom +import kr.co.vividnext.sodalive.member.Member import kr.co.vividnext.sodalive.member.MemberRepository import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service @@ -41,9 +42,9 @@ class CanPaymentService( ) { val member = memberRepository.findByIdOrNull(id = memberId) ?: throw SodaException("잘못된 요청입니다.\n다시 시도해 주세요.") - val useRewardCan = spendRewardCan(memberId, needCan, container) + val useRewardCan = spendRewardCan(member, needCan, container) val useChargeCan = if (needCan - useRewardCan.total > 0) { - spendChargeCan(memberId, needCan = needCan - useRewardCan.total, container = container) + spendChargeCan(member, needCan = needCan - useRewardCan.total, container = container) } else { null } @@ -143,19 +144,19 @@ class CanPaymentService( } } - private fun spendRewardCan(memberId: Long, needCan: Int, container: String): TotalSpentCan { + private fun spendRewardCan(member: Member, needCan: Int, container: String): TotalSpentCan { return if (needCan > 0) { - val member = memberRepository.findByIdOrNull(id = memberId) - ?: throw SodaException("잘못된 요청입니다.\n다시 시도해 주세요.") - val spentCans = mutableListOf() var chargeId = 0L var total = 0 while (needCan - total > 0) { val remainingNeedCan = needCan - total - val charge = chargeRepository.getOldestChargeWhereRewardCanGreaterThan0(chargeId, memberId, container) - ?: break + val charge = chargeRepository.getOldestChargeWhereRewardCanGreaterThan0( + chargeId, + member.id!!, + container + ) ?: break if (charge.rewardCan >= remainingNeedCan) { charge.rewardCan -= remainingNeedCan @@ -201,19 +202,19 @@ class CanPaymentService( } } - private fun spendChargeCan(memberId: Long, needCan: Int, container: String): TotalSpentCan { + private fun spendChargeCan(member: Member, needCan: Int, container: String): TotalSpentCan { return if (needCan > 0) { - val member = memberRepository.findByIdOrNull(id = memberId) - ?: throw SodaException("잘못된 요청입니다.\n다시 시도해 주세요.") - val spentCans = mutableListOf() var chargeId = 0L var total = 0 while (needCan - total > 0) { val remainingNeedCan = needCan - total - val charge = chargeRepository.getOldestChargeWhereChargeCanGreaterThan0(chargeId, memberId, container) - ?: break + val charge = chargeRepository.getOldestChargeWhereChargeCanGreaterThan0( + chargeId, + member.id!!, + container + ) ?: break if (charge.chargeCan >= remainingNeedCan) { charge.chargeCan -= remainingNeedCan -- 2.40.1 From aa457cc2fbcb09e68a16c62ea8eed0b23668b703 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 3 Sep 2023 00:45:46 +0900 Subject: [PATCH 08/10] suda -> live --- .../kr/co/vividnext/sodalive/common/SodaExceptionHandler.kt | 2 +- .../{CreateSudaRoomRequest.kt => CreateLiveRoomRequest.kt} | 2 +- .../kr/co/vividnext/sodalive/live/room/LiveRoomService.kt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/main/kotlin/kr/co/vividnext/sodalive/live/room/{CreateSudaRoomRequest.kt => CreateLiveRoomRequest.kt} (92%) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/common/SodaExceptionHandler.kt b/src/main/kotlin/kr/co/vividnext/sodalive/common/SodaExceptionHandler.kt index 4b9aa7f..65c1599 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/common/SodaExceptionHandler.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/common/SodaExceptionHandler.kt @@ -14,7 +14,7 @@ class SodaExceptionHandler { private val logger = LoggerFactory.getLogger(this::class.java) @ExceptionHandler(SodaException::class) - fun handleSudaException(e: SodaException) = run { + fun handleSodaException(e: SodaException) = run { logger.error("API error", e) ApiResponse.error( message = e.message, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateSudaRoomRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateLiveRoomRequest.kt similarity index 92% rename from src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateSudaRoomRequest.kt rename to src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateLiveRoomRequest.kt index 2df98d8..22b5468 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateSudaRoomRequest.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/CreateLiveRoomRequest.kt @@ -1,6 +1,6 @@ package kr.co.vividnext.sodalive.live.room -data class CreateSudaRoomRequest( +data class CreateLiveRoomRequest( val title: String, val content: String, val coverImageUrl: String? = null, 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 576cdc7..528abc9 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 @@ -161,7 +161,7 @@ class LiveRoomService( @Transactional fun createLiveRoom(coverImage: MultipartFile?, requestString: String, member: Member): CreateLiveRoomResponse { - val request = objectMapper.readValue(requestString, CreateSudaRoomRequest::class.java) + val request = objectMapper.readValue(requestString, CreateLiveRoomRequest::class.java) if (request.coverImageUrl == null && coverImage == null) { throw SodaException("커버이미지를 선택해 주세요.") } @@ -604,7 +604,7 @@ class LiveRoomService( val coverImagePath = s3Uploader.upload( inputStream = coverImage.inputStream, bucket = coverImageBucket, - filePath = "suda_room_cover/${room.id}/$coverImageFileName", + filePath = "live_room_cover/${room.id}/$coverImageFileName", metadata = metadata ) -- 2.40.1 From f3590dac7aa6af52e29c8c632a338a36af79baaa Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 3 Sep 2023 01:01:13 +0900 Subject: [PATCH 09/10] =?UTF-8?q?=EB=A6=AC=EC=9B=8C=EB=93=9C=EC=BD=94?= =?UTF-8?q?=EC=9D=B8=20=EC=9E=98=EB=AA=BB=20=EC=8D=A8=EC=A7=80=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/vividnext/sodalive/can/payment/CanPaymentService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt index 3d0c283..08229c8 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt @@ -185,9 +185,9 @@ class CanPaymentService( ) when (charge.payment!!.paymentGateway) { - PaymentGateway.PG -> member.pgRewardCan -= remainingNeedCan - PaymentGateway.APPLE_IAP -> member.appleRewardCan -= remainingNeedCan - PaymentGateway.GOOGLE_IAP -> member.googleRewardCan -= remainingNeedCan + PaymentGateway.PG -> member.pgRewardCan -= charge.rewardCan + PaymentGateway.APPLE_IAP -> member.appleRewardCan -= charge.rewardCan + PaymentGateway.GOOGLE_IAP -> member.googleRewardCan -= charge.rewardCan } charge.rewardCan = 0 -- 2.40.1 From d68a089235cc031b1999257ec7e45bf1dd3ef04a Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 3 Sep 2023 01:03:24 +0900 Subject: [PATCH 10/10] =?UTF-8?q?=EC=B6=A9=EC=A0=84=EC=BD=94=EC=9D=B8=20?= =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EC=8D=A8=EC=A7=80=EB=8A=94=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/vividnext/sodalive/can/payment/CanPaymentService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt index 08229c8..602e82e 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/can/payment/CanPaymentService.kt @@ -243,9 +243,9 @@ class CanPaymentService( ) when (charge.payment!!.paymentGateway) { - PaymentGateway.PG -> member.pgChargeCan -= remainingNeedCan - PaymentGateway.APPLE_IAP -> member.appleChargeCan -= remainingNeedCan - PaymentGateway.GOOGLE_IAP -> member.pgChargeCan -= remainingNeedCan + PaymentGateway.PG -> member.pgChargeCan -= charge.chargeCan + PaymentGateway.APPLE_IAP -> member.appleChargeCan -= charge.chargeCan + PaymentGateway.GOOGLE_IAP -> member.pgChargeCan -= charge.chargeCan } charge.chargeCan = 0 -- 2.40.1