From 320c0d6da93655090f10ebc5b14c020570efc5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=EB=AF=BC?= Date: Wed, 12 Feb 2025 17:28:00 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20(#798)=20requestDate=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/vote/service/ModelStudentListService.kt | 2 +- .../vote/service/ModelStudentListServiceImpl.kt | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListService.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListService.kt index 4e2c8a73e..a529a96a8 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListService.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListService.kt @@ -4,5 +4,5 @@ import team.aliens.dms.domain.vote.dto.response.ModelStudentListResponse import java.time.LocalDate interface ModelStudentListService { - fun getModelStudentList(requestDate: LocalDate): List + fun getModelStudentList(date: LocalDate): List } diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListServiceImpl.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListServiceImpl.kt index 63788e4ac..f8cd18f59 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListServiceImpl.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/vote/service/ModelStudentListServiceImpl.kt @@ -3,17 +3,16 @@ package team.aliens.dms.domain.vote.service import team.aliens.dms.common.annotation.Service import team.aliens.dms.domain.vote.dto.response.ModelStudentListResponse import team.aliens.dms.domain.vote.spi.ModelStudentListPort -import java.security.InvalidParameterException import java.time.LocalDate @Service class ModelStudentListServiceImpl( private val modelStudentListPort: ModelStudentListPort ) : ModelStudentListService { - override fun getModelStudentList(requestDate: LocalDate): List { + override fun getModelStudentList(date: LocalDate): List { - val firstDayOfMonth = requestDate.withDayOfMonth(1) - val lastDayOfMonth = requestDate.withDayOfMonth(requestDate.lengthOfMonth()) + val firstDayOfMonth = date.withDayOfMonth(1) + val lastDayOfMonth = date.withDayOfMonth(date.lengthOfMonth()) val startOfDay = firstDayOfMonth.atStartOfDay() val endOfDay = lastDayOfMonth.atTime(23, 59, 59) @@ -27,9 +26,9 @@ class ModelStudentListServiceImpl( return modelStudentList.map { student -> ModelStudentListResponse( id = student.id, - studentGcn = student.studentGcn, - studentName = student.studentName, - studentProfile = student.studentProfile + gcn = student.studentGcn, + name = student.studentName, + profileImageUrl = student.studentProfile ) } }