diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/admin/can/AdminCanService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/admin/can/AdminCanService.kt index 3cdd6e1..786138b 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/admin/can/AdminCanService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/admin/can/AdminCanService.kt @@ -38,7 +38,7 @@ class AdminCanService( val member = memberRepository.findByIdOrNull(request.memberId) ?: throw SodaException("잘못된 회원번호 입니다.") - if (request.can <= 0) throw SodaException("0 코인 이상 입력하세요.") + if (request.can <= 0) throw SodaException("1 캔 이상 입력하세요.") if (request.method.isBlank()) throw SodaException("기록내용을 입력하세요.") val charge = Charge(0, request.can, status = ChargeStatus.ADMIN) 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 d9dbbe0..fd3a937 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 @@ -90,15 +90,15 @@ class CanPaymentService( useCanRepository.save(useCan) - setUseCoinCalculate(recipientId, useRewardCan, useChargeCan, useCan, paymentGateway = PaymentGateway.PG) - setUseCoinCalculate( + setUseCanCalculate(recipientId, useRewardCan, useChargeCan, useCan, paymentGateway = PaymentGateway.PG) + setUseCanCalculate( recipientId, useRewardCan, useChargeCan, useCan, paymentGateway = PaymentGateway.GOOGLE_IAP ) - setUseCoinCalculate( + setUseCanCalculate( recipientId, useRewardCan, useChargeCan, @@ -107,7 +107,7 @@ class CanPaymentService( ) } - private fun setUseCoinCalculate( + private fun setUseCanCalculate( recipientId: Long?, useRewardCan: TotalSpentCan, useChargeCan: TotalSpentCan?, @@ -271,8 +271,8 @@ class CanPaymentService( ) ?: throw SodaException("잘못된 예약정보 입니다.") useCan.isRefund = true - val useCoinCalculates = useCanCalculateRepository.findByUseCanIdAndStatus(useCan.id!!) - useCoinCalculates.forEach { + val useCanCalculates = useCanCalculateRepository.findByUseCanIdAndStatus(useCan.id!!) + useCanCalculates.forEach { it.status = UseCanCalculateStatus.REFUND val charge = Charge(0, it.can, status = ChargeStatus.REFUND_CHARGE) charge.title = "${it.can} 캔" 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 f849a25..48dbe84 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt @@ -150,7 +150,7 @@ class AudioContentService( val theme = themeQueryRepository.findThemeByIdAndActive(id = request.themeId) ?: throw SodaException("잘못된 테마입니다. 다시 선택해 주세요.") - if (request.price in 1..9) throw SodaException("콘텐츠의 최소금액은 10코인 입니다.") + if (request.price in 1..9) throw SodaException("콘텐츠의 최소금액은 10캔 입니다.") // DB에 값 추가 val audioContent = AudioContent( diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentRepository.kt index d09397c..b58aa2d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentRepository.kt @@ -67,7 +67,7 @@ class AudioContentCommentQueryRepositoryImpl( "$cloudFrontHost/profile/default-profile.png" }, comment = it.comment, - donationCoin = it.donationCan ?: 0, + donationCan = it.donationCan ?: 0, date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")), replyCount = commentReplyCountByAudioContentCommentId(it.id!!) ) @@ -131,7 +131,7 @@ class AudioContentCommentQueryRepositoryImpl( "$cloudFrontHost/profile/default-profile.png" }, comment = it.comment, - donationCoin = it.donationCan ?: 0, + donationCan = it.donationCan ?: 0, date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")), replyCount = 0 ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/GetAudioContentCommentListResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/GetAudioContentCommentListResponse.kt index 08be9e4..bbdd725 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/GetAudioContentCommentListResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/GetAudioContentCommentListResponse.kt @@ -11,7 +11,7 @@ data class GetAudioContentCommentListItem( val nickname: String, val profileUrl: String, val comment: String, - val donationCoin: Int, + val donationCan: Int, val date: String, val replyCount: 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 33fb311..db641b4 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerQueryRepository.kt @@ -58,7 +58,7 @@ class ExplorerQueryRepository( creatorId: Long, limit: Long, offset: Long = 0, - withDonationCoin: Boolean + withDonationCan: Boolean ): List { val creator = QMember("creator") val member = QMember("user") @@ -82,7 +82,7 @@ class ExplorerQueryRepository( .fetch() .map { val account = it.get(member)!! - val donationCoin = it.get(donation)!! + val donationCan = it.get(donation)!! MemberDonationRankingResponse( account.id!!, account.nickname, @@ -91,7 +91,7 @@ class ExplorerQueryRepository( } else { "$cloudFrontHost/profile/default-profile.png" }, - if (withDonationCoin) donationCoin else 0 + if (withDonationCan) donationCan else 0 ) } } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/MemberDonationRankingResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/MemberDonationRankingResponse.kt index 3e6e3f9..343c56a 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/MemberDonationRankingResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/MemberDonationRankingResponse.kt @@ -4,5 +4,5 @@ data class MemberDonationRankingResponse( val userId: Long, val nickname: String, val profileImage: String, - val donationCoin: Int + val donationCan: Int ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt index 0e835a1..195d3ea 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt @@ -31,7 +31,7 @@ class FaqController(private val service: FaqService) { @DeleteMapping("/{id}") @PreAuthorize("hasRole('ADMIN')") - fun deleteCoin(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") + fun deleteCan(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") @GetMapping fun getFaqList(@RequestParam("category") category: String) = ApiResponse.ok(service.getFaqList(category)) 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 a894b70..77c0255 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 @@ -642,7 +642,7 @@ class LiveRoomService( .getMemberDonationRanking( room.member!!.id!!, 3, - withDonationCoin = false + withDonationCan = false ) .asSequence() .map { it.userId } @@ -786,7 +786,7 @@ class LiveRoomService( fun getDonationTotal(roomId: Long): GetLiveRoomDonationTotalResponse { return GetLiveRoomDonationTotalResponse( - totalDonationCoin = repository.getDonationTotal(roomId = roomId) ?: 0 + totalDonationCan = repository.getDonationTotal(roomId = roomId) ?: 0 ) } @@ -908,8 +908,8 @@ class LiveRoomService( ) ?: throw SodaException("후원에 실패한 캔이 환불되지 않았습니다\n고객센터로 문의해주세요.") useCan.isRefund = true - val useCoinCalculates = useCanCalculateRepository.findByUseCanIdAndStatus(useCan.id!!) - useCoinCalculates.forEach { + val useCanCalculates = useCanCalculateRepository.findByUseCanIdAndStatus(useCan.id!!) + useCanCalculates.forEach { it.status = UseCanCalculateStatus.REFUND val charge = Charge(0, it.can, status = ChargeStatus.REFUND_CHARGE) charge.title = "${it.can} 캔" diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationTotalResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationTotalResponse.kt index 8dc9556..2db7f9b 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationTotalResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationTotalResponse.kt @@ -1,3 +1,3 @@ package kr.co.vividnext.sodalive.live.room.donation -data class GetLiveRoomDonationTotalResponse(val totalDonationCoin: Int) +data class GetLiveRoomDonationTotalResponse(val totalDonationCan: Int) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt index f1f7921..e4f258f 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt @@ -31,7 +31,7 @@ class ServiceNoticeController(private val service: ServiceNoticeService) { @DeleteMapping("/{id}") @PreAuthorize("hasRole('ADMIN')") - fun deleteCoin(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") + fun deleteCan(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") @GetMapping fun getNoticeList(pageable: Pageable, timezone: String) = ApiResponse.ok(service.getNoticeList(pageable, timezone))