Skip to content

Commit

Permalink
refactor: (#798) GetModelStudentsUseCase 및 컨트롤러 students 도메인 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
pji-min committed Feb 14, 2025
1 parent 347cdcb commit 894ac8e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package team.aliens.dms.domain.vote.usecase
package team.aliens.dms.domain.student.usecase

import team.aliens.dms.common.annotation.ReadOnlyUseCase
import team.aliens.dms.domain.vote.dto.response.ModelStudentListResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import jakarta.validation.Valid
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import org.springframework.format.annotation.DateTimeFormat
import org.springframework.http.HttpStatus
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.DeleteMapping
Expand Down Expand Up @@ -37,23 +38,9 @@ import team.aliens.dms.domain.student.dto.StudentsResponse
import team.aliens.dms.domain.student.dto.request.ResetStudentPasswordWebRequest
import team.aliens.dms.domain.student.dto.request.SignUpWebRequest
import team.aliens.dms.domain.student.dto.request.UpdateStudentProfileWebRequest
import team.aliens.dms.domain.student.usecase.CheckDuplicatedAccountIdUseCase
import team.aliens.dms.domain.student.usecase.CheckDuplicatedEmailUseCase
import team.aliens.dms.domain.student.usecase.CheckStudentGcnUseCase
import team.aliens.dms.domain.student.usecase.ExportStudentUseCase
import team.aliens.dms.domain.student.usecase.FindStudentAccountIdUseCase
import team.aliens.dms.domain.student.usecase.ImportStudentUseCase
import team.aliens.dms.domain.student.usecase.ManagerGetAllStudentsUseCase
import team.aliens.dms.domain.student.usecase.QueryStudentDetailsUseCase
import team.aliens.dms.domain.student.usecase.RemoveStudentUseCase
import team.aliens.dms.domain.student.usecase.ResetStudentPasswordUseCase
import team.aliens.dms.domain.student.usecase.SignUpUseCase
import team.aliens.dms.domain.student.usecase.StudentGetAllStudentsUseCase
import team.aliens.dms.domain.student.usecase.StudentMyPageUseCase
import team.aliens.dms.domain.student.usecase.StudentWithdrawalUseCase
import team.aliens.dms.domain.student.usecase.UpdateStudentGcnByFileUseCase
import team.aliens.dms.domain.student.usecase.UpdateStudentProfileUseCase
import team.aliens.dms.domain.student.usecase.UpdateStudentRoomByFileUseCase
import team.aliens.dms.domain.student.usecase.*
import team.aliens.dms.domain.vote.dto.response.ModelStudentListResponse
import java.time.LocalDate
import java.util.UUID

@Validated
Expand All @@ -76,7 +63,8 @@ class StudentWebAdapter(
private val updateStudentGcnByFileUseCase: UpdateStudentGcnByFileUseCase,
private val updateStudentRoomByFileUseCase: UpdateStudentRoomByFileUseCase,
private val importStudentUseCase: ImportStudentUseCase,
private val studentGetAllStudentsUseCase: StudentGetAllStudentsUseCase
private val studentGetAllStudentsUseCase: StudentGetAllStudentsUseCase,
private val getModelStudentsUseCase: GetModelStudentsUseCase
) {

@ResponseStatus(HttpStatus.CREATED)
Expand Down Expand Up @@ -237,4 +225,13 @@ class StudentWebAdapter(
fun studentGetAllStudents(@RequestParam(required = false) name: String?): StudentsResponse {
return studentGetAllStudentsUseCase.execute(name)
}

@GetMapping("/candidate-list/{date}")
fun getModelStudents(
@PathVariable
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
date: LocalDate
): List<ModelStudentListResponse> {
return getModelStudentsUseCase.execute(date)
}
}

This file was deleted.

0 comments on commit 894ac8e

Please sign in to comment.