feat(chat): 채팅권 구매 가격과 채팅횟수 변경 #352
@@ -54,7 +54,7 @@ class ChatRoomQuotaController(
|
|||||||
): ApiResponse<PurchaseRoomQuotaResponse> = run {
|
): ApiResponse<PurchaseRoomQuotaResponse> = run {
|
||||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||||
if (member.auth == null) throw SodaException("본인인증을 하셔야 합니다.")
|
if (member.auth == null) throw SodaException("본인인증을 하셔야 합니다.")
|
||||||
if (req.container.isBlank()) throw SodaException("container를 확인해주세요.")
|
if (req.container.isBlank()) throw SodaException("잘못된 접근입니다")
|
||||||
|
|
||||||
val room = chatRoomRepository.findByIdAndIsActiveTrue(chatRoomId)
|
val room = chatRoomRepository.findByIdAndIsActiveTrue(chatRoomId)
|
||||||
?: throw SodaException("채팅방을 찾을 수 없습니다.")
|
?: throw SodaException("채팅방을 찾을 수 없습니다.")
|
||||||
@@ -79,7 +79,7 @@ class ChatRoomQuotaController(
|
|||||||
memberId = member.id!!,
|
memberId = member.id!!,
|
||||||
chatRoomId = chatRoomId,
|
chatRoomId = chatRoomId,
|
||||||
characterId = characterId,
|
characterId = characterId,
|
||||||
addPaid = 40,
|
addPaid = 12,
|
||||||
container = req.container
|
container = req.container
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -126,13 +126,13 @@ class ChatRoomQuotaService(
|
|||||||
memberId: Long,
|
memberId: Long,
|
||||||
chatRoomId: Long,
|
chatRoomId: Long,
|
||||||
characterId: Long,
|
characterId: Long,
|
||||||
addPaid: Int = 40,
|
addPaid: Int = 12,
|
||||||
container: String
|
container: String
|
||||||
): RoomQuotaStatus {
|
): RoomQuotaStatus {
|
||||||
// 요구사항: 30캔 결제 및 UseCan에 방/캐릭터 기록
|
// 요구사항: 10캔 결제 및 UseCan에 방/캐릭터 기록
|
||||||
canPaymentService.spendCan(
|
canPaymentService.spendCan(
|
||||||
memberId = memberId,
|
memberId = memberId,
|
||||||
needCan = 30,
|
needCan = 10,
|
||||||
canUsage = CanUsage.CHAT_QUOTA_PURCHASE,
|
canUsage = CanUsage.CHAT_QUOTA_PURCHASE,
|
||||||
chatRoomId = chatRoomId,
|
chatRoomId = chatRoomId,
|
||||||
characterId = characterId,
|
characterId = characterId,
|
||||||
|
|||||||
Reference in New Issue
Block a user