Compare commits
No commits in common. "7af059e54384f5989624e1d0a391657f422fab17" and "897726e1ec3add1db8c5e07505c0beb5b039c7cd" have entirely different histories.
7af059e543
...
897726e1ec
|
@ -2,7 +2,6 @@ package kr.co.vividnext.sodalive.fcm
|
||||||
|
|
||||||
import com.google.firebase.messaging.FirebaseMessaging
|
import com.google.firebase.messaging.FirebaseMessaging
|
||||||
import com.google.firebase.messaging.MulticastMessage
|
import com.google.firebase.messaging.MulticastMessage
|
||||||
import com.google.firebase.messaging.Notification
|
|
||||||
import org.springframework.scheduling.annotation.Async
|
import org.springframework.scheduling.annotation.Async
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
|
@ -19,22 +18,10 @@ class FcmService {
|
||||||
contentId: Long? = null
|
contentId: Long? = null
|
||||||
) {
|
) {
|
||||||
val multicastMessage = MulticastMessage.builder()
|
val multicastMessage = MulticastMessage.builder()
|
||||||
|
.putData("title", title)
|
||||||
|
.putData("message", message)
|
||||||
.addAllTokens(tokens)
|
.addAllTokens(tokens)
|
||||||
|
|
||||||
if (container == "ios") {
|
|
||||||
multicastMessage
|
|
||||||
.setNotification(
|
|
||||||
Notification.builder()
|
|
||||||
.setTitle(title)
|
|
||||||
.setBody(message)
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
multicastMessage
|
|
||||||
.putData("title", title)
|
|
||||||
.putData("message", message)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (roomId != null) {
|
if (roomId != null) {
|
||||||
multicastMessage.putData("room_id", roomId.toString())
|
multicastMessage.putData("room_id", roomId.toString())
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,6 @@ interface LiveReservationQueryRepository {
|
||||||
reservationId: Long,
|
reservationId: Long,
|
||||||
memberId: Long
|
memberId: Long
|
||||||
): LiveReservation?
|
): LiveReservation?
|
||||||
|
|
||||||
fun getReservationCount(memberId: Long): Int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
|
@ -99,16 +97,4 @@ class LiveReservationQueryRepositoryImpl(private val queryFactory: JPAQueryFacto
|
||||||
)
|
)
|
||||||
.fetchFirst()
|
.fetchFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getReservationCount(memberId: Long): Int {
|
|
||||||
return queryFactory
|
|
||||||
.selectFrom(liveReservation)
|
|
||||||
.where(
|
|
||||||
liveReservation.member.id.eq(memberId)
|
|
||||||
.and(liveReservation.isActive.isTrue)
|
|
||||||
.and(liveReservation.room.isActive.isTrue)
|
|
||||||
)
|
|
||||||
.fetch()
|
|
||||||
.size
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -672,7 +672,6 @@ class LiveRoomService(
|
||||||
"$cloudFrontHost/profile/default-profile.png"
|
"$cloudFrontHost/profile/default-profile.png"
|
||||||
},
|
},
|
||||||
isFollowing = isFollowing,
|
isFollowing = isFollowing,
|
||||||
isAdult = room.isAdult,
|
|
||||||
participantsCount = roomInfo.listenerCount + roomInfo.speakerCount + roomInfo.managerCount,
|
participantsCount = roomInfo.listenerCount + roomInfo.speakerCount + roomInfo.managerCount,
|
||||||
totalAvailableParticipantsCount = room.numberOfPeople,
|
totalAvailableParticipantsCount = room.numberOfPeople,
|
||||||
speakerList = roomInfo.speakerList,
|
speakerList = roomInfo.speakerList,
|
||||||
|
|
|
@ -12,7 +12,6 @@ data class GetRoomInfoResponse(
|
||||||
val creatorNickname: String,
|
val creatorNickname: String,
|
||||||
val creatorProfileUrl: String,
|
val creatorProfileUrl: String,
|
||||||
val isFollowing: Boolean,
|
val isFollowing: Boolean,
|
||||||
val isAdult: Boolean,
|
|
||||||
val participantsCount: Int,
|
val participantsCount: Int,
|
||||||
val totalAvailableParticipantsCount: Int,
|
val totalAvailableParticipantsCount: Int,
|
||||||
val speakerList: List<LiveRoomMember>,
|
val speakerList: List<LiveRoomMember>,
|
||||||
|
|
|
@ -7,10 +7,8 @@ import kr.co.vividnext.sodalive.can.payment.CanPaymentService
|
||||||
import kr.co.vividnext.sodalive.can.use.CanUsage
|
import kr.co.vividnext.sodalive.can.use.CanUsage
|
||||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||||
import kr.co.vividnext.sodalive.common.SodaException
|
import kr.co.vividnext.sodalive.common.SodaException
|
||||||
import kr.co.vividnext.sodalive.content.order.OrderService
|
|
||||||
import kr.co.vividnext.sodalive.email.SendEmailService
|
import kr.co.vividnext.sodalive.email.SendEmailService
|
||||||
import kr.co.vividnext.sodalive.jwt.TokenProvider
|
import kr.co.vividnext.sodalive.jwt.TokenProvider
|
||||||
import kr.co.vividnext.sodalive.live.reservation.LiveReservationRepository
|
|
||||||
import kr.co.vividnext.sodalive.live.room.detail.GetRoomDetailUser
|
import kr.co.vividnext.sodalive.live.room.detail.GetRoomDetailUser
|
||||||
import kr.co.vividnext.sodalive.member.block.BlockMember
|
import kr.co.vividnext.sodalive.member.block.BlockMember
|
||||||
import kr.co.vividnext.sodalive.member.block.BlockMemberRepository
|
import kr.co.vividnext.sodalive.member.block.BlockMemberRepository
|
||||||
|
@ -68,9 +66,7 @@ class MemberService(
|
||||||
private val signOutRepository: SignOutRepository,
|
private val signOutRepository: SignOutRepository,
|
||||||
private val nicknameChangeLogRepository: NicknameChangeLogRepository,
|
private val nicknameChangeLogRepository: NicknameChangeLogRepository,
|
||||||
private val memberTagRepository: MemberTagRepository,
|
private val memberTagRepository: MemberTagRepository,
|
||||||
private val liveReservationRepository: LiveReservationRepository,
|
|
||||||
|
|
||||||
private val orderService: OrderService,
|
|
||||||
private val emailService: SendEmailService,
|
private val emailService: SendEmailService,
|
||||||
private val canPaymentService: CanPaymentService,
|
private val canPaymentService: CanPaymentService,
|
||||||
private val memberNotificationService: MemberNotificationService,
|
private val memberNotificationService: MemberNotificationService,
|
||||||
|
@ -169,14 +165,6 @@ class MemberService(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getMyPage(member: Member, container: String): MyPageResponse {
|
fun getMyPage(member: Member, container: String): MyPageResponse {
|
||||||
val liveReservationCount = liveReservationRepository.getReservationCount(memberId = member.id!!)
|
|
||||||
|
|
||||||
val orderList = orderService.getAudioContentOrderList(
|
|
||||||
member = member,
|
|
||||||
offset = 0,
|
|
||||||
limit = 4
|
|
||||||
)
|
|
||||||
|
|
||||||
return MyPageResponse(
|
return MyPageResponse(
|
||||||
nickname = member.nickname,
|
nickname = member.nickname,
|
||||||
profileUrl = if (member.profileImage != null) {
|
profileUrl = if (member.profileImage != null) {
|
||||||
|
@ -190,9 +178,8 @@ class MemberService(
|
||||||
instagramUrl = member.instagramUrl,
|
instagramUrl = member.instagramUrl,
|
||||||
websiteUrl = member.websiteUrl,
|
websiteUrl = member.websiteUrl,
|
||||||
blogUrl = member.blogUrl,
|
blogUrl = member.blogUrl,
|
||||||
liveReservationCount = liveReservationCount,
|
liveReservationCount = 0,
|
||||||
isAuth = member.auth != null,
|
isAuth = member.auth != null
|
||||||
orderList = orderList
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package kr.co.vividnext.sodalive.member.myPage
|
package kr.co.vividnext.sodalive.member.myPage
|
||||||
|
|
||||||
import kr.co.vividnext.sodalive.content.order.GetAudioContentOrderListResponse
|
|
||||||
|
|
||||||
data class MyPageResponse(
|
data class MyPageResponse(
|
||||||
val nickname: String,
|
val nickname: String,
|
||||||
val profileUrl: String,
|
val profileUrl: String,
|
||||||
|
@ -12,6 +10,5 @@ data class MyPageResponse(
|
||||||
val websiteUrl: String? = null,
|
val websiteUrl: String? = null,
|
||||||
val blogUrl: String? = null,
|
val blogUrl: String? = null,
|
||||||
val liveReservationCount: Int,
|
val liveReservationCount: Int,
|
||||||
val isAuth: Boolean,
|
val isAuth: Boolean
|
||||||
val orderList: GetAudioContentOrderListResponse
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue