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