From 86bb0a17bfce3795dee573e2bb6f7efbba987373 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Wed, 25 Oct 2023 23:03:11 +0900 Subject: [PATCH 01/12] create :: query all student activity resopnse --- .../data/response/QueryAllStudentActivityResponse.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt new file mode 100644 index 000000000..aadf2a550 --- /dev/null +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt @@ -0,0 +1,12 @@ +package team.msg.domain.student.presentation.data.response + +import team.msg.common.enum.ApproveStatus +import java.util.UUID + +data class QueryAllStudentActivityResponse( + val activityId: UUID, + val title: String, + val userId: UUID, + val userName: String, + val approveStatus: ApproveStatus +) \ No newline at end of file From 65039dd98790b2dae4a4a0fed987cb07fe1cd5a7 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Wed, 25 Oct 2023 23:03:37 +0900 Subject: [PATCH 02/12] add :: query all student activity service --- .../student/service/StudentActivityService.kt | 4 ++++ .../service/StudentActivityServiceImpl.kt | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt index f0312f51c..1c5282421 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt @@ -1,7 +1,10 @@ package team.msg.domain.student.service +import org.springframework.data.domain.Page +import org.springframework.data.domain.Pageable import team.msg.domain.student.presentation.data.request.CreateStudentActivityRequest import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest +import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse import java.util.UUID interface StudentActivityService { @@ -10,4 +13,5 @@ interface StudentActivityService { fun deleteStudentActivity(id: UUID) fun rejectStudentActivity(id: UUID) fun approveStudentActivity(id: UUID) + fun listStudentActivity(pageable: Pageable): Page } \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt index 6959cb4b8..863986369 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt @@ -1,6 +1,8 @@ package team.msg.domain.student.service import org.springframework.context.ApplicationEventPublisher +import org.springframework.data.domain.Page +import org.springframework.data.domain.Pageable import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional @@ -13,6 +15,7 @@ import team.msg.domain.student.exception.StudentNotFoundException import team.msg.domain.student.model.StudentActivity import team.msg.domain.student.presentation.data.request.CreateStudentActivityRequest import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest +import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse import team.msg.domain.student.repository.StudentActivityRepository import team.msg.domain.student.repository.StudentRepository import team.msg.domain.teacher.exception.TeacherNotFoundException @@ -160,4 +163,24 @@ class StudentActivityServiceImpl( studentActivityRepository.save(updatedStudentActivity) } + + @Transactional(readOnly = true) + override fun listStudentActivity(pageable: Pageable): Page { + val user = userUtil.queryCurrentUser() + + val studentActivities = studentActivityRepository.findAll(pageable) + + val response = studentActivities.map { + QueryAllStudentActivityResponse( + activityId = it.id, + title = it.title, + approveStatus = it.approveStatus, + userId = user.id, + userName = user.name + ) + } + + return response + } + } \ No newline at end of file From a8afa4a81cd5f1de28f6184a3dd0682149831a54 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Wed, 25 Oct 2023 23:15:42 +0900 Subject: [PATCH 03/12] =?UTF-8?q?update=20::=20=ED=95=A8=EC=88=98=EB=AA=85?= =?UTF-8?q?=20=EA=B7=9C=EC=95=BD=EB=8C=80=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/msg/domain/student/service/StudentActivityService.kt | 2 +- .../msg/domain/student/service/StudentActivityServiceImpl.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt index 1c5282421..40672bbd6 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt @@ -13,5 +13,5 @@ interface StudentActivityService { fun deleteStudentActivity(id: UUID) fun rejectStudentActivity(id: UUID) fun approveStudentActivity(id: UUID) - fun listStudentActivity(pageable: Pageable): Page + fun queryAllStudentActivity(pageable: Pageable): Page } \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt index 863986369..f48e24f33 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt @@ -165,7 +165,7 @@ class StudentActivityServiceImpl( } @Transactional(readOnly = true) - override fun listStudentActivity(pageable: Pageable): Page { + override fun queryAllStudentActivity(pageable: Pageable): Page { val user = userUtil.queryCurrentUser() val studentActivities = studentActivityRepository.findAll(pageable) @@ -179,7 +179,7 @@ class StudentActivityServiceImpl( userName = user.name ) } - + return response } From 35bf3224f5df0c639abbce9b63041c9b1b47edd8 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Wed, 25 Oct 2023 23:16:16 +0900 Subject: [PATCH 04/12] add :: query all student activity controller --- .../presentation/StudentActivityController.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt index a3965796c..dc51be3ab 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt @@ -1,9 +1,12 @@ package team.msg.domain.student.presentation import javax.validation.Valid +import org.springframework.data.domain.Page +import org.springframework.data.domain.Pageable import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.DeleteMapping +import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PatchMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping @@ -11,10 +14,11 @@ import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController import team.msg.domain.student.mapper.StudentActivityMapper +import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse 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 -import java.util.UUID +import java.util.* @RestController @RequestMapping("/activity") @@ -53,4 +57,10 @@ class StudentActivityController( studentActivityService.rejectStudentActivity(id) return ResponseEntity.status(HttpStatus.NO_CONTENT).build() } + + @GetMapping + fun queryAllStudentActivity(pageable: Pageable): ResponseEntity> { + val result = studentActivityService.queryAllStudentActivity(pageable) + return ResponseEntity.status(HttpStatus.OK).body(result) + } } \ No newline at end of file From 397a27c546f737d01e81fa65a9e36a035e0627f3 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Wed, 25 Oct 2023 23:18:52 +0900 Subject: [PATCH 05/12] add :: query all student activity security config --- .../src/main/kotlin/team/msg/global/security/SecurityConfig.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/bitgouel-api/src/main/kotlin/team/msg/global/security/SecurityConfig.kt b/bitgouel-api/src/main/kotlin/team/msg/global/security/SecurityConfig.kt index cfb96e8b8..8e2f94b92 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/global/security/SecurityConfig.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/global/security/SecurityConfig.kt @@ -61,6 +61,7 @@ class SecurityConfig( .mvcMatchers(HttpMethod.PATCH, "/activity/{id}/approve").hasRole(TEACHER) .mvcMatchers(HttpMethod.DELETE, "/activity/{id}").hasRole(STUDENT) .mvcMatchers(HttpMethod.DELETE, "/activity/{id}/reject").hasRole(TEACHER) + .mvcMatchers(HttpMethod.GET, "/activity").hasRole(ADMIN) // lecture .mvcMatchers(HttpMethod.POST, "/lecture").hasAnyRole(PROFESSOR, COMPANY_INSTRUCTOR, GOVERNMENT) From 8f2228ce366e0ab4502a66337f27767f0d640b2f Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Thu, 26 Oct 2023 14:50:50 +0900 Subject: [PATCH 06/12] create :: student activity response --- .../QueryAllStudentActivityResponse.kt | 12 -------- .../data/response/StudentActivityResponse.kt | 30 +++++++++++++++++++ 2 files changed, 30 insertions(+), 12 deletions(-) delete mode 100644 bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt create mode 100644 bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/StudentActivityResponse.kt diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt deleted file mode 100644 index aadf2a550..000000000 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/QueryAllStudentActivityResponse.kt +++ /dev/null @@ -1,12 +0,0 @@ -package team.msg.domain.student.presentation.data.response - -import team.msg.common.enum.ApproveStatus -import java.util.UUID - -data class QueryAllStudentActivityResponse( - val activityId: UUID, - val title: String, - val userId: UUID, - val userName: String, - val approveStatus: ApproveStatus -) \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/StudentActivityResponse.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/StudentActivityResponse.kt new file mode 100644 index 000000000..a042b2d32 --- /dev/null +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/response/StudentActivityResponse.kt @@ -0,0 +1,30 @@ +package team.msg.domain.student.presentation.data.response + +import org.springframework.data.domain.Page +import team.msg.common.enum.ApproveStatus +import team.msg.domain.student.model.StudentActivity +import team.msg.domain.user.model.User +import java.util.* + +data class StudentActivityResponse( + val activityId: UUID, + val title: String, + val userId: UUID, + val username: String, + val approveStatus: ApproveStatus +) { + companion object { + fun of(studentActivity: StudentActivity, user: User) = + StudentActivityResponse( + activityId = studentActivity.id, + title = studentActivity.title, + userId = user.id, + username = user.name, + approveStatus = user.approveStatus + ) + } +} + +data class AllStudentActivityResponse( + val activities: Page +) \ No newline at end of file From 835a88b703ca11a0c97f62b2866e604d3ae298e1 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Thu, 26 Oct 2023 14:54:25 +0900 Subject: [PATCH 07/12] =?UTF-8?q?update=20::=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=A6=AC=ED=84=B4=ED=83=80=EC=9E=85=20=EC=83=88=20response?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student/service/StudentActivityService.kt | 7 +++--- .../service/StudentActivityServiceImpl.kt | 22 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt index 40672bbd6..48f0f59b7 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityService.kt @@ -1,11 +1,10 @@ package team.msg.domain.student.service -import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import team.msg.domain.student.presentation.data.request.CreateStudentActivityRequest import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest -import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse -import java.util.UUID +import team.msg.domain.student.presentation.data.response.AllStudentActivityResponse +import java.util.* interface StudentActivityService { fun createStudentActivity(request: CreateStudentActivityRequest) @@ -13,5 +12,5 @@ interface StudentActivityService { fun deleteStudentActivity(id: UUID) fun rejectStudentActivity(id: UUID) fun approveStudentActivity(id: UUID) - fun queryAllStudentActivity(pageable: Pageable): Page + fun queryAllStudentActivity(pageable: Pageable): AllStudentActivityResponse } \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt index f48e24f33..0b5a72568 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt @@ -1,7 +1,6 @@ package team.msg.domain.student.service import org.springframework.context.ApplicationEventPublisher -import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service @@ -15,12 +14,12 @@ import team.msg.domain.student.exception.StudentNotFoundException import team.msg.domain.student.model.StudentActivity import team.msg.domain.student.presentation.data.request.CreateStudentActivityRequest import team.msg.domain.student.presentation.data.request.UpdateStudentActivityRequest -import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse +import team.msg.domain.student.presentation.data.response.AllStudentActivityResponse +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.repository.TeacherRepository -import team.msg.domain.user.enums.Authority import java.util.* @Service @@ -165,21 +164,16 @@ class StudentActivityServiceImpl( } @Transactional(readOnly = true) - override fun queryAllStudentActivity(pageable: Pageable): Page { + override fun queryAllStudentActivity(pageable: Pageable): AllStudentActivityResponse { val user = userUtil.queryCurrentUser() val studentActivities = studentActivityRepository.findAll(pageable) - val response = studentActivities.map { - QueryAllStudentActivityResponse( - activityId = it.id, - title = it.title, - approveStatus = it.approveStatus, - userId = user.id, - userName = user.name - ) - } - + val response = AllStudentActivityResponse( + studentActivities.map { + StudentActivityResponse.of(it, user) + } + ) return response } From e0668c1de1630a8b3e2efa98d258d4d22ab70725 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Thu, 26 Oct 2023 15:01:48 +0900 Subject: [PATCH 08/12] =?UTF-8?q?update=20::=20controller=20response?= =?UTF-8?q?=ED=83=80=EC=9E=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/student/presentation/StudentActivityController.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt index dc51be3ab..a54429699 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt @@ -1,7 +1,6 @@ package team.msg.domain.student.presentation import javax.validation.Valid -import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity @@ -14,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController import team.msg.domain.student.mapper.StudentActivityMapper -import team.msg.domain.student.presentation.data.response.QueryAllStudentActivityResponse +import team.msg.domain.student.presentation.data.response.AllStudentActivityResponse 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 @@ -59,7 +58,7 @@ class StudentActivityController( } @GetMapping - fun queryAllStudentActivity(pageable: Pageable): ResponseEntity> { + fun queryAllStudentActivity(pageable: Pageable): ResponseEntity { val result = studentActivityService.queryAllStudentActivity(pageable) return ResponseEntity.status(HttpStatus.OK).body(result) } From 0f7b5f4214cd0255eef9eba2a32400e4f1bc3565 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Thu, 26 Oct 2023 20:44:39 +0900 Subject: [PATCH 09/12] =?UTF-8?q?add=20::=20student=20activity=20=EA=B0=9D?= =?UTF-8?q?=EC=B2=B4=20=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20student=EB=8F=84?= =?UTF-8?q?=20=EA=B0=99=EC=9D=B4=20=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/student/repository/StudentActivityRepository.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitgouel-domain/src/main/kotlin/team/msg/domain/student/repository/StudentActivityRepository.kt b/bitgouel-domain/src/main/kotlin/team/msg/domain/student/repository/StudentActivityRepository.kt index 2d983d868..faa3c86f2 100644 --- a/bitgouel-domain/src/main/kotlin/team/msg/domain/student/repository/StudentActivityRepository.kt +++ b/bitgouel-domain/src/main/kotlin/team/msg/domain/student/repository/StudentActivityRepository.kt @@ -1,11 +1,15 @@ package team.msg.domain.student.repository +import org.springframework.data.domain.Page +import org.springframework.data.domain.Pageable +import org.springframework.data.jpa.repository.EntityGraph import org.springframework.data.jpa.repository.JpaRepository import team.msg.domain.student.model.Student import team.msg.domain.student.model.StudentActivity -import team.msg.domain.teacher.model.Teacher import java.util.* interface StudentActivityRepository : JpaRepository { fun findAllByStudent(student: Student): List + @EntityGraph(attributePaths = ["student"]) + override fun findAll(pageable: Pageable): Page } \ No newline at end of file From a965d4af7a012bd1d5d783084354484885ed48b0 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Fri, 27 Oct 2023 09:25:53 +0900 Subject: [PATCH 10/12] =?UTF-8?q?add=20::=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/web/CreateStudentActivityWebRequest.kt | 8 +++++--- .../domain/student/service/StudentActivityServiceImpl.kt | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/web/CreateStudentActivityWebRequest.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/web/CreateStudentActivityWebRequest.kt index 534dc9e66..161ca94fe 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/web/CreateStudentActivityWebRequest.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/data/web/CreateStudentActivityWebRequest.kt @@ -1,22 +1,24 @@ package team.msg.domain.student.presentation.data.web -import javax.validation.constraints.Max +import com.fasterxml.jackson.annotation.JsonFormat import javax.validation.constraints.NotBlank import javax.validation.constraints.NotNull +import javax.validation.constraints.Size import java.time.LocalDateTime data class CreateStudentActivityWebRequest( @field:NotBlank - @field:Max(100) + @field:Size(max = 100) val title: String, @field:NotBlank - @field:Max(1000) + @field:Size(max = 1000) val content: String, @field:NotNull val credit: Int, @field:NotNull + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss") val activityDate: LocalDateTime ) \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt index 0b5a72568..36f496a43 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt @@ -163,6 +163,10 @@ class StudentActivityServiceImpl( studentActivityRepository.save(updatedStudentActivity) } + /** + * 학생활동을 승인하는 비즈니스 로직 + * @param 학생활동을 승인하기 위한 id + */ @Transactional(readOnly = true) override fun queryAllStudentActivity(pageable: Pageable): AllStudentActivityResponse { val user = userUtil.queryCurrentUser() From af8be2f31c130285cecdfde814f6f9786bd168e4 Mon Sep 17 00:00:00 2001 From: KimTaeO Date: Fri, 27 Oct 2023 09:28:52 +0900 Subject: [PATCH 11/12] =?UTF-8?q?docs=20::=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msg/domain/student/service/StudentActivityServiceImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt index 36f496a43..f0bcab710 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt @@ -164,8 +164,8 @@ class StudentActivityServiceImpl( } /** - * 학생활동을 승인하는 비즈니스 로직 - * @param 학생활동을 승인하기 위한 id + * 학생활동을 전체 조회하는 비즈니스 로직 + * @param 학생활동을 페이징 처리하기 위한 pageable */ @Transactional(readOnly = true) override fun queryAllStudentActivity(pageable: Pageable): AllStudentActivityResponse { From 06268d568c944267389ea3d80a3ec09bd4796bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=83=9C=EC=98=A4?= <103710151+KimTaeO@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:59:04 +0900 Subject: [PATCH 12/12] =?UTF-8?q?update=20::=20query=20all=20student=20act?= =?UTF-8?q?ivity=20=EB=B3=80=EC=88=98=EB=AA=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/student/presentation/StudentActivityController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt index a54429699..2c0252546 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt @@ -59,7 +59,7 @@ class StudentActivityController( @GetMapping fun queryAllStudentActivity(pageable: Pageable): ResponseEntity { - val result = studentActivityService.queryAllStudentActivity(pageable) - return ResponseEntity.status(HttpStatus.OK).body(result) + val response = studentActivityService.queryAllStudentActivity(pageable) + return ResponseEntity.status(HttpStatus.OK).body(response) } } \ No newline at end of file