Compare commits
No commits in common. "0c3f190044a18e72d6d043cbba285ace9cedd1a9" and "63f690ee2d1e229c49cfa99ebfddea385ff4d4bf" have entirely different histories.
0c3f190044
...
63f690ee2d
|
@ -69,7 +69,6 @@ class ExplorerQueryRepository(
|
||||||
useCanCalculate.status.eq(UseCanCalculateStatus.RECEIVED)
|
useCanCalculate.status.eq(UseCanCalculateStatus.RECEIVED)
|
||||||
.and(
|
.and(
|
||||||
useCan.canUsage.eq(CanUsage.DONATION)
|
useCan.canUsage.eq(CanUsage.DONATION)
|
||||||
.or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))
|
|
||||||
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
||||||
)
|
)
|
||||||
.and(useCan.isRefund.isFalse)
|
.and(useCan.isRefund.isFalse)
|
||||||
|
@ -108,7 +107,6 @@ class ExplorerQueryRepository(
|
||||||
.and(useCanCalculate.recipientCreatorId.eq(creatorId))
|
.and(useCanCalculate.recipientCreatorId.eq(creatorId))
|
||||||
.and(
|
.and(
|
||||||
useCan.canUsage.eq(CanUsage.DONATION)
|
useCan.canUsage.eq(CanUsage.DONATION)
|
||||||
.or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))
|
|
||||||
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -139,7 +137,6 @@ class ExplorerQueryRepository(
|
||||||
.and(useCanCalculate.recipientCreatorId.eq(creatorId))
|
.and(useCanCalculate.recipientCreatorId.eq(creatorId))
|
||||||
.and(
|
.and(
|
||||||
useCan.canUsage.eq(CanUsage.DONATION)
|
useCan.canUsage.eq(CanUsage.DONATION)
|
||||||
.or(useCan.canUsage.eq(CanUsage.SPIN_ROULETTE))
|
|
||||||
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
.or(useCan.canUsage.eq(CanUsage.LIVE))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -41,7 +41,6 @@ interface LiveRoomQueryRepository {
|
||||||
fun getRecentRoomInfo(memberId: Long, cloudFrontHost: String): GetRecentRoomInfoResponse?
|
fun getRecentRoomInfo(memberId: Long, cloudFrontHost: String): GetRecentRoomInfoResponse?
|
||||||
fun getDonationTotal(roomId: Long): Int?
|
fun getDonationTotal(roomId: Long): Int?
|
||||||
fun getDonationList(roomId: Long, cloudFrontHost: String): List<GetLiveRoomDonationItem>
|
fun getDonationList(roomId: Long, cloudFrontHost: String): List<GetLiveRoomDonationItem>
|
||||||
fun getRoomActiveAndChannelNameIsNotNull(): List<LiveRoom>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : LiveRoomQueryRepository {
|
class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : LiveRoomQueryRepository {
|
||||||
|
@ -191,16 +190,6 @@ class LiveRoomQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : L
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getRoomActiveAndChannelNameIsNotNull(): List<LiveRoom> {
|
|
||||||
return queryFactory
|
|
||||||
.selectFrom(liveRoom)
|
|
||||||
.where(
|
|
||||||
liveRoom.isActive.isTrue
|
|
||||||
.and(liveRoom.channelName.isNotNull)
|
|
||||||
)
|
|
||||||
.fetch()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun orderByFieldAccountId(
|
private fun orderByFieldAccountId(
|
||||||
memberId: Long,
|
memberId: Long,
|
||||||
status: LiveRoomStatus,
|
status: LiveRoomStatus,
|
||||||
|
|
|
@ -182,13 +182,6 @@ class LiveRoomService(
|
||||||
now
|
now
|
||||||
}
|
}
|
||||||
|
|
||||||
if (now == beginDateTime) {
|
|
||||||
val activeRooms = repository.getRoomActiveAndChannelNameIsNotNull()
|
|
||||||
for (activeRoom in activeRooms) {
|
|
||||||
activeRoom.isActive = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
request.beginDateTimeString != null &&
|
request.beginDateTimeString != null &&
|
||||||
beginDateTime < now.plusMinutes(30)
|
beginDateTime < now.plusMinutes(30)
|
||||||
|
@ -410,11 +403,6 @@ class LiveRoomService(
|
||||||
throw SodaException("$startAvailableDateTimeString 이후에 시작할 수 있습니다.")
|
throw SodaException("$startAvailableDateTimeString 이후에 시작할 수 있습니다.")
|
||||||
}
|
}
|
||||||
|
|
||||||
val activeRooms = repository.getRoomActiveAndChannelNameIsNotNull()
|
|
||||||
for (activeRoom in activeRooms) {
|
|
||||||
activeRoom.isActive = false
|
|
||||||
}
|
|
||||||
|
|
||||||
val dateTime = nowDateTime
|
val dateTime = nowDateTime
|
||||||
.atZone(ZoneId.of("UTC"))
|
.atZone(ZoneId.of("UTC"))
|
||||||
.withZoneSameInstant(ZoneId.of(request.timezone))
|
.withZoneSameInstant(ZoneId.of(request.timezone))
|
||||||
|
|
Loading…
Reference in New Issue