Compare commits
2 Commits
c876378b21
...
c8764be69f
Author | SHA1 | Date |
---|---|---|
|
c8764be69f | |
|
c9970ce7ca |
|
@ -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)
|
||||
|
|
|
@ -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} 캔"
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -58,7 +58,7 @@ class ExplorerQueryRepository(
|
|||
creatorId: Long,
|
||||
limit: Long,
|
||||
offset: Long = 0,
|
||||
withDonationCoin: Boolean
|
||||
withDonationCan: Boolean
|
||||
): List<MemberDonationRankingResponse> {
|
||||
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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ data class MemberDonationRankingResponse(
|
|||
val userId: Long,
|
||||
val nickname: String,
|
||||
val profileImage: String,
|
||||
val donationCoin: Int
|
||||
val donationCan: Int
|
||||
)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package kr.co.vividnext.sodalive.fcm
|
||||
|
||||
import kr.co.vividnext.sodalive.member.MemberRepository
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.context.event.EventListener
|
||||
import org.springframework.scheduling.annotation.Async
|
||||
import org.springframework.stereotype.Component
|
||||
|
@ -28,8 +27,6 @@ class FcmSendListener(
|
|||
private val pushService: FcmService,
|
||||
private val memberRepository: MemberRepository
|
||||
) {
|
||||
private val logger = LoggerFactory.getLogger(FcmSendListener::class.java)
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
fun send(fcmEvent: FcmEvent) {
|
||||
|
@ -94,8 +91,6 @@ class FcmSendListener(
|
|||
container = fcmEvent.container
|
||||
)
|
||||
|
||||
logger.info("pushTokens: $pushTokens")
|
||||
|
||||
for (tokens in pushTokens) {
|
||||
pushService.send(
|
||||
tokens = tokens,
|
||||
|
|
|
@ -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} 캔"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
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}")
|
||||
@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))
|
||||
|
|
Loading…
Reference in New Issue