Merge pull request '내 콘텐츠 수정, 삭제 시 콘텐츠 조회 함수' (#239) from test into main
Reviewed-on: #239
This commit is contained in:
commit
79f5a0f520
|
@ -138,8 +138,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.selectFrom(audioContent)
|
.selectFrom(audioContent)
|
||||||
.where(
|
.where(
|
||||||
audioContent.isActive.isTrue
|
audioContent.id.eq(contentId)
|
||||||
.and(audioContent.id.eq(contentId))
|
|
||||||
.and(audioContent.member.id.eq(creatorId))
|
.and(audioContent.member.id.eq(creatorId))
|
||||||
)
|
)
|
||||||
.fetchOne()
|
.fetchOne()
|
||||||
|
|
|
@ -760,6 +760,10 @@ class AudioContentService(
|
||||||
val audioContent = repository.findByIdAndCreatorId(contentId = contentId, creatorId = member.id!!)
|
val audioContent = repository.findByIdAndCreatorId(contentId = contentId, creatorId = member.id!!)
|
||||||
?: throw SodaException("잘못된 콘텐츠 입니다.\n다시 시도해 주세요.")
|
?: throw SodaException("잘못된 콘텐츠 입니다.\n다시 시도해 주세요.")
|
||||||
|
|
||||||
|
if (audioContent.releaseDate != null && audioContent.releaseDate!! >= LocalDateTime.now()) {
|
||||||
|
throw SodaException("콘텐츠 오픈 후 채널에 고정이 가능합니다.")
|
||||||
|
}
|
||||||
|
|
||||||
var pinContent = pinContentRepository.findByContentIdAndMemberId(
|
var pinContent = pinContentRepository.findByContentIdAndMemberId(
|
||||||
contentId = contentId,
|
contentId = contentId,
|
||||||
memberId = member.id!!
|
memberId = member.id!!
|
||||||
|
|
Loading…
Reference in New Issue