feat: 구매한 콘텐츠 댓글 이벤트 추가
This commit is contained in:
@@ -46,6 +46,13 @@ class AudioContentCommentController(
|
||||
actionType = ActionType.CONTENT_COMMENT,
|
||||
pushTokenList = pushTokenList
|
||||
)
|
||||
|
||||
userActionService.recordAction(
|
||||
memberId = member.id!!,
|
||||
actionType = ActionType.ORDER_CONTENT_COMMENT,
|
||||
contentId = request.contentId,
|
||||
pushTokenList = pushTokenList
|
||||
)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,7 @@ interface OrderQueryRepository {
|
||||
fun findOrderedContent(contentIdList: List<Long>, memberId: Long): List<Long>
|
||||
fun findEndDateByContentId(contentIdList: List<Long>, memberId: Long): List<ContentIdAndEndDateData>
|
||||
fun findBuyerListByContentId(contentId: Long): List<ContentBuyer>
|
||||
fun findByMemberIdAndContentId(memberId: Long, contentId: Long, createdAt: LocalDateTime): Order?
|
||||
}
|
||||
|
||||
@Repository
|
||||
@@ -280,4 +281,16 @@ class OrderQueryRepositoryImpl(
|
||||
)
|
||||
.fetch()
|
||||
}
|
||||
|
||||
override fun findByMemberIdAndContentId(memberId: Long, contentId: Long, createdAt: LocalDateTime): Order? {
|
||||
return queryFactory
|
||||
.selectFrom(order)
|
||||
.where(
|
||||
order.isActive.isTrue,
|
||||
order.member.id.eq(memberId),
|
||||
order.audioContent.id.eq(contentId),
|
||||
order.createdAt.after(createdAt)
|
||||
)
|
||||
.fetchFirst()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user