Skip to content

Commit

Permalink
refactor: (#798) requestDate 변수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
pji-min committed Feb 12, 2025
1 parent da740a6 commit 320c0d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import team.aliens.dms.domain.vote.dto.response.ModelStudentListResponse
import java.time.LocalDate

interface ModelStudentListService {
fun getModelStudentList(requestDate: LocalDate): List<ModelStudentListResponse>
fun getModelStudentList(date: LocalDate): List<ModelStudentListResponse>
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<ModelStudentListResponse> {
override fun getModelStudentList(date: LocalDate): List<ModelStudentListResponse> {

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)
Expand All @@ -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
)
}
}
Expand Down

0 comments on commit 320c0d6

Please sign in to comment.