Skip to content

Commit

Permalink
필수 교양 과목 get api 연도별 api로 통합
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeryboy committed Dec 6, 2024
1 parent 731abc9 commit 33a3ab7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ class AcademicsController(
@RequestPart newAttachments: List<MultipartFile>?
) = academicsService.updateGuide(language, studentType, request, newAttachments)

@GetMapping("/undergraduate/general-studies-requirements")
fun readGeneralStudiesRequirements(
@RequestParam(required = false, defaultValue = "ko") language: String
): ResponseEntity<GeneralStudiesRequirementsPageResponse> {
return ResponseEntity.ok(academicsService.readGeneralStudiesRequirements(language))
}

@GetMapping("/{studentType}/{postType}")
fun readAcademicsYearResponses(
@RequestParam(required = false, defaultValue = "ko") language: String,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ interface AcademicsService {
postType: String
): List<AcademicsYearResponse>

fun readGeneralStudiesRequirements(language: String): GeneralStudiesRequirementsPageResponse
fun readDegreeRequirements(language: String): DegreeRequirementsPageResponse
fun updateDegreeRequirements(language: String, request: UpdateSingleReq, newAttachments: List<MultipartFile>?)
fun createCourse(request: GroupedCourseDto)
Expand Down Expand Up @@ -214,25 +213,6 @@ class AcademicsServiceImpl(
return academicsYearResponses
}

@Transactional(readOnly = true)
override fun readGeneralStudiesRequirements(language: String): GeneralStudiesRequirementsPageResponse {
val enumLanguageType = LanguageType.makeStringToLanguageType(language)
val overview =
academicsRepository.findByLanguageAndStudentTypeAndPostTypeAndYear(
enumLanguageType,
AcademicsStudentType.UNDERGRADUATE,
AcademicsPostType.GENERAL_STUDIES_REQUIREMENTS,
null
) ?: throw CserealException.Csereal404("General Studies Requirements Not Found")
val generalStudiesEntity =
academicsRepository.findAllByLanguageAndStudentTypeAndPostTypeOrderByYearDesc(
enumLanguageType,
AcademicsStudentType.UNDERGRADUATE,
AcademicsPostType.GENERAL_STUDIES_REQUIREMENTS
).filter { academicsEntity -> academicsEntity.year != null }
return GeneralStudiesRequirementsPageResponse.of(overview, generalStudiesEntity)
}

@Transactional(readOnly = true)
override fun readDegreeRequirements(language: String): DegreeRequirementsPageResponse {
val enumLanguageType = LanguageType.makeStringToLanguageType(language)
Expand Down

0 comments on commit 33a3ab7

Please sign in to comment.