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