Skip to content

Commit

Permalink
chore :: detail -> details
Browse files Browse the repository at this point in the history
  • Loading branch information
KimTaeO committed Nov 12, 2023
1 parent a19ccb7 commit e271f52
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController
import team.msg.domain.student.mapper.StudentActivityMapper
import team.msg.domain.student.presentation.data.response.AllStudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailsResponse
import team.msg.domain.student.presentation.data.web.CreateStudentActivityWebRequest
import team.msg.domain.student.presentation.data.web.UpdateStudentActivityWebRequest
import team.msg.domain.student.service.StudentActivityService
Expand Down Expand Up @@ -78,7 +78,7 @@ class StudentActivityController(
}

@GetMapping("/{id}/detail")
fun queryStudentActivityDetail(@PathVariable id: UUID): ResponseEntity<StudentActivityDetailResponse> {
fun queryStudentActivityDetail(@PathVariable id: UUID): ResponseEntity<StudentActivityDetailsResponse> {
val response = studentActivityService.queryStudentActivityDetail(id)
return ResponseEntity.status(HttpStatus.OK).body(response)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ data class StudentActivityResponse(
)
}

fun detailOf(studentActivity: StudentActivity): StudentActivityDetailResponse =
StudentActivityDetailResponse(
fun detailOf(studentActivity: StudentActivity): StudentActivityDetailsResponse =
StudentActivityDetailsResponse(
id = studentActivity.id,
title = studentActivity.title,
content = studentActivity.content,
Expand All @@ -46,7 +46,7 @@ data class StudentActivitiesResponse(
val activities: Page<StudentActivityResponse>
)

data class StudentActivityDetailResponse(
data class StudentActivityDetailsResponse(
val id: UUID,
val title: String,
val content: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import team.msg.domain.student.presentation.data.request.CreateStudentActivityRe
import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest
import team.msg.domain.student.presentation.data.response.AllStudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailsResponse
import java.util.*

interface StudentActivityService {
Expand All @@ -17,5 +17,5 @@ interface StudentActivityService {
fun queryAllStudentActivities(pageable: Pageable): AllStudentActivitiesResponse
fun queryStudentActivitiesByStudent(studentId: UUID, pageable: Pageable): StudentActivitiesResponse
fun queryMyStudentActivities(pageable: Pageable): StudentActivitiesResponse
fun queryStudentActivityDetail(id: UUID): StudentActivityDetailResponse
fun queryStudentActivityDetail(id: UUID): StudentActivityDetailsResponse
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import team.msg.common.enums.ApproveStatus
import team.msg.common.util.UserUtil
import team.msg.domain.admin.model.Admin
import team.msg.domain.bbozzak.model.Bbozzak
import team.msg.domain.company.model.CompanyInstructor
import team.msg.domain.government.model.Government
Expand All @@ -22,14 +21,13 @@ import team.msg.domain.student.presentation.data.request.CreateStudentActivityRe
import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest
import team.msg.domain.student.presentation.data.response.AllStudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivitiesResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailResponse
import team.msg.domain.student.presentation.data.response.StudentActivityDetailsResponse
import team.msg.domain.student.presentation.data.response.StudentActivityResponse
import team.msg.domain.student.repository.StudentActivityRepository
import team.msg.domain.student.repository.StudentRepository
import team.msg.domain.teacher.exception.TeacherNotFoundException
import team.msg.domain.teacher.model.Teacher
import team.msg.domain.teacher.repository.TeacherRepository
import team.msg.global.exception.InvalidRoleException
import java.util.*

@Service
Expand Down Expand Up @@ -241,7 +239,7 @@ class StudentActivityServiceImpl(
* @param 학생 활동을 조회하기 위한 id
*/
@Transactional(readOnly = true)
override fun queryStudentActivityDetail(id: UUID): StudentActivityDetailResponse {
override fun queryStudentActivityDetail(id: UUID): StudentActivityDetailsResponse {
val user = userUtil.queryCurrentUser()

val entity = userUtil.getAuthorityEntityAndOrganization(user).first
Expand Down

0 comments on commit e271f52

Please sign in to comment.