이벤트 배너, 충전 이벤트 - 기간 설정에 시간 추가 #285
@@ -59,7 +59,7 @@ class AdminEventBannerQueryRepositoryImpl(
 | 
				
			|||||||
                "UTC",
 | 
					                "UTC",
 | 
				
			||||||
                "Asia/Seoul"
 | 
					                "Asia/Seoul"
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            "%Y-%m-%d"
 | 
					            "%Y-%m-%d %H:%i"
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@ import org.springframework.data.repository.findByIdOrNull
 | 
				
			|||||||
import org.springframework.stereotype.Service
 | 
					import org.springframework.stereotype.Service
 | 
				
			||||||
import org.springframework.transaction.annotation.Transactional
 | 
					import org.springframework.transaction.annotation.Transactional
 | 
				
			||||||
import org.springframework.web.multipart.MultipartFile
 | 
					import org.springframework.web.multipart.MultipartFile
 | 
				
			||||||
import java.time.LocalDate
 | 
					import java.time.LocalDateTime
 | 
				
			||||||
import java.time.ZoneId
 | 
					import java.time.ZoneId
 | 
				
			||||||
import java.time.format.DateTimeFormatter
 | 
					import java.time.format.DateTimeFormatter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -36,13 +36,13 @@ class AdminEventBannerService(
 | 
				
			|||||||
    ): Long {
 | 
					    ): Long {
 | 
				
			||||||
        if (detail == null && link.isNullOrBlank()) throw SodaException("상세이미지 혹은 링크를 등록하세요")
 | 
					        if (detail == null && link.isNullOrBlank()) throw SodaException("상세이미지 혹은 링크를 등록하세요")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
 | 
					        val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")
 | 
				
			||||||
        val startDate = LocalDate.parse(startDateString, dateTimeFormatter).atTime(0, 0)
 | 
					        val startDate = LocalDateTime.parse(startDateString, dateTimeFormatter)
 | 
				
			||||||
            .atZone(ZoneId.of("Asia/Seoul"))
 | 
					            .atZone(ZoneId.of("Asia/Seoul"))
 | 
				
			||||||
            .withZoneSameInstant(ZoneId.of("UTC"))
 | 
					            .withZoneSameInstant(ZoneId.of("UTC"))
 | 
				
			||||||
            .toLocalDateTime()
 | 
					            .toLocalDateTime()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        val endDate = LocalDate.parse(endDateString, dateTimeFormatter).atTime(23, 59, 59)
 | 
					        val endDate = LocalDateTime.parse(endDateString, dateTimeFormatter).withSecond(59)
 | 
				
			||||||
            .atZone(ZoneId.of("Asia/Seoul"))
 | 
					            .atZone(ZoneId.of("Asia/Seoul"))
 | 
				
			||||||
            .withZoneSameInstant(ZoneId.of("UTC"))
 | 
					            .withZoneSameInstant(ZoneId.of("UTC"))
 | 
				
			||||||
            .toLocalDateTime()
 | 
					            .toLocalDateTime()
 | 
				
			||||||
@@ -172,16 +172,16 @@ class AdminEventBannerService(
 | 
				
			|||||||
            event.isAdult = isAdult
 | 
					            event.isAdult = isAdult
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
 | 
					        val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")
 | 
				
			||||||
        if (startDateString != null) {
 | 
					        if (startDateString != null) {
 | 
				
			||||||
            event.startDate = LocalDate.parse(startDateString, dateTimeFormatter).atTime(0, 0)
 | 
					            event.startDate = LocalDateTime.parse(startDateString, dateTimeFormatter)
 | 
				
			||||||
                .atZone(ZoneId.of("Asia/Seoul"))
 | 
					                .atZone(ZoneId.of("Asia/Seoul"))
 | 
				
			||||||
                .withZoneSameInstant(ZoneId.of("UTC"))
 | 
					                .withZoneSameInstant(ZoneId.of("UTC"))
 | 
				
			||||||
                .toLocalDateTime()
 | 
					                .toLocalDateTime()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (endDateString != null) {
 | 
					        if (endDateString != null) {
 | 
				
			||||||
            event.endDate = LocalDate.parse(endDateString, dateTimeFormatter).atTime(23, 59, 59)
 | 
					            event.endDate = LocalDateTime.parse(endDateString, dateTimeFormatter).withSecond(59)
 | 
				
			||||||
                .atZone(ZoneId.of("Asia/Seoul"))
 | 
					                .atZone(ZoneId.of("Asia/Seoul"))
 | 
				
			||||||
                .withZoneSameInstant(ZoneId.of("UTC"))
 | 
					                .withZoneSameInstant(ZoneId.of("UTC"))
 | 
				
			||||||
                .toLocalDateTime()
 | 
					                .toLocalDateTime()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user