이벤트 배너, 팝업

- 본인 인증 여부에 따라 노출할 수 있도록 isAdult 컬럼 추가
This commit is contained in:
2023-11-21 21:41:45 +09:00
parent 7fefc9b0a6
commit 61cf1577dc
5 changed files with 53 additions and 16 deletions

View File

@@ -20,8 +20,8 @@ class EventService(
@Value("\${cloud.aws.cloud-front.host}")
private val cloudFrontHost: String
) {
fun getEventList(): GetEventResponse {
val eventList = repository.getEventList()
fun getEventList(isAdult: Boolean): GetEventResponse {
val eventList = repository.getEventList(isAdult)
.asSequence()
.map {
if (!it.thumbnailImageUrl.startsWith("https://")) {
@@ -43,8 +43,8 @@ class EventService(
return GetEventResponse(0, eventList)
}
fun getEventPopup(): EventItem? {
val eventPopup = repository.getMainEventPopup()
fun getEventPopup(isAdult: Boolean): EventItem? {
val eventPopup = repository.getMainEventPopup(isAdult)
if (eventPopup != null) {
if (!eventPopup.thumbnailImageUrl.startsWith("https://")) {