From 8b4b397eaccbf63dde0e8d8640fa01401ad7935e Mon Sep 17 00:00:00 2001 From: min56 Date: Mon, 1 May 2023 22:00:37 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=90=9B=20::=20UserInfoRequest?= =?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 --- .../pickdsm/pickserverspring/common/feign/client/UserClient.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt index 5fa41d8b..7da66d63 100644 --- a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt +++ b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt @@ -3,6 +3,7 @@ package com.pickdsm.pickserverspring.common.feign.client import com.pickdsm.pickserverspring.common.feign.client.dto.response.UserInfoResponse import com.pickdsm.pickserverspring.common.feign.client.dto.response.UserInfoResponse.UserInfoElement import com.pickdsm.pickserverspring.common.feign.client.dto.response.UserResponse +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import org.springframework.cloud.openfeign.FeignClient import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable @@ -16,7 +17,7 @@ import javax.validation.Valid interface UserClient { @PostMapping("/users/id") - fun getUserInfo(@Valid @RequestBody ids: List): UserInfoResponse + fun getUserInfo(@Valid @RequestBody request: UserInfoRequest): UserInfoResponse @GetMapping("/users/class") fun getUserInfoByGradeAndClassNum( From d0fcecbd3931e97d5d35abc91f3d16cd26bde1ce Mon Sep 17 00:00:00 2001 From: min56 Date: Mon, 1 May 2023 22:04:49 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=90=9B=20::=20UserInfoRequest?= =?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 --- .../domain/admin/usecase/AdminUseCase.kt | 10 +++++++--- .../afterschool/usecase/AfterSchoolUseCase.kt | 5 ++++- .../spi/UserQueryApplicationSpi.kt | 3 ++- .../application/usecase/ApplicationUseCase.kt | 19 +++++++++++++------ .../usecase/ClassroomMovementUseCase.kt | 4 +++- .../spi/UserQuerySelfStudyDirectorSpi.kt | 3 ++- .../usecase/SelfStudyDirectorUseCase.kt | 7 +++++-- .../domain/teacher/spi/UserQueryTeacherSpi.kt | 3 ++- .../domain/teacher/usecase/TeacherUseCase.kt | 5 +++-- .../persistence/UserPersistenceAdapter.kt | 7 ++++--- 10 files changed, 45 insertions(+), 21 deletions(-) diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/usecase/AdminUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/usecase/AdminUseCase.kt index 605982a4..ec923ed5 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/usecase/AdminUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/usecase/AdminUseCase.kt @@ -29,6 +29,7 @@ import com.pickdsm.pickserverspring.domain.teacher.spi.StatusCommandTeacherSpi import com.pickdsm.pickserverspring.domain.teacher.spi.TimeQueryTeacherSpi import com.pickdsm.pickserverspring.domain.time.exception.TimeNotFoundException import com.pickdsm.pickserverspring.domain.time.spi.QueryTimeSpi +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.exception.UserNotFoundException import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.time.LocalDate @@ -55,7 +56,8 @@ class AdminUseCase( val timeList = timeQueryTeacherSpi.queryTime(LocalDate.now()) val nowPeriod = queryTimeSpi.queryNowPeriod(timeList) val userIdList = request.userList.map { it.userId } - val userInfoList = userSpi.queryUserInfo(userIdList) + val userIdRequest = UserInfoRequest(userIdList) + val userInfoList = userSpi.queryUserInfo(userIdRequest) val changeStatusList: List = request.userList.map { val user = userInfoList.find { user -> user.id == it.userId } @@ -118,7 +120,8 @@ class AdminUseCase( DirectorType.AFTER_SCHOOL -> { val afterSchoolList = queryAfterSchoolSpi.queryAfterSchoolListByClassroomId(classroomId) val afterSchoolStudentIdList = afterSchoolList.map { it.studentId } - val afterSchoolUserInfos = userSpi.queryUserInfo(afterSchoolStudentIdList) + val userIdRequest = UserInfoRequest(afterSchoolStudentIdList) + val afterSchoolUserInfos = userSpi.queryUserInfo(userIdRequest) afterSchoolUserInfos.map { user -> val afterSchoolStatusList = dateStatusList.filter { it.studentId == user.id } @@ -150,7 +153,8 @@ class AdminUseCase( DirectorType.FRI_CLUB, DirectorType.TUE_CLUB -> { val clubList = queryClubSpi.queryClubListByClassroomId(classroomId) val clubStudentIdList = clubList.map { it.studentId } - val clubUserInfos = userSpi.queryUserInfo(clubStudentIdList) + val userIdRequest = UserInfoRequest(clubStudentIdList) + val clubUserInfos = userSpi.queryUserInfo(userIdRequest) clubUserInfos.map { user -> val clubStatusList = dateStatusList.filter { it.studentId == user.id } diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt index 5b8baf55..0d3d5edd 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt @@ -11,6 +11,8 @@ import com.pickdsm.pickserverspring.domain.afterschool.exception.AfterSchoolNotF import com.pickdsm.pickserverspring.domain.afterschool.exception.AfterSchoolStudentExistsException import com.pickdsm.pickserverspring.domain.afterschool.spi.CommandAfterSchoolSpi import com.pickdsm.pickserverspring.domain.afterschool.spi.QueryAfterSchoolSpi +import com.pickdsm.pickserverspring.domain.user.User +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.exception.UserNotFoundException import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.util.* @@ -55,7 +57,8 @@ class AfterSchoolUseCase( ?: throw AfterSchoolNotFoundException val afterSchoolList = queryAfterSchoolSpi.queryAfterSchoolListByAfterSchoolId(afterSchoolId) val afterSchoolStudentIdList = afterSchoolList.map { it.studentId } - val afterSchoolStudentInfos = userSpi.queryUserInfo(afterSchoolStudentIdList) + val userIdRequest = UserInfoRequest(afterSchoolStudentIdList) + val afterSchoolStudentInfos = userSpi.queryUserInfo(userIdRequest) val afterSchoolUsers = afterSchoolList.map { val user = afterSchoolStudentInfos.find { user -> user.id == it.studentId } diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/spi/UserQueryApplicationSpi.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/spi/UserQueryApplicationSpi.kt index 73f3ef7f..a013d204 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/spi/UserQueryApplicationSpi.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/spi/UserQueryApplicationSpi.kt @@ -1,11 +1,12 @@ package com.pickdsm.pickserverspring.domain.application.spi import com.pickdsm.pickserverspring.domain.user.User +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import java.util.UUID interface UserQueryApplicationSpi { - fun queryUserInfo(ids: List): List + fun queryUserInfo(request: UserInfoRequest): List fun queryUserInfoByUserId(userId: UUID): User } diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/usecase/ApplicationUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/usecase/ApplicationUseCase.kt index 2f739559..4ab60522 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/usecase/ApplicationUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/application/usecase/ApplicationUseCase.kt @@ -34,6 +34,7 @@ import com.pickdsm.pickserverspring.domain.selfstudydirector.spi.QueryTypeSpi import com.pickdsm.pickserverspring.domain.teacher.spi.StatusCommandTeacherSpi import com.pickdsm.pickserverspring.domain.teacher.spi.TimeQueryTeacherSpi import com.pickdsm.pickserverspring.domain.time.exception.TimeNotFoundException +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.exception.UserNotFoundException import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.time.DayOfWeek @@ -100,7 +101,8 @@ class ApplicationUseCase( val todayStatusList = queryStatusSpi.queryAwaitStudentListByToday(today) val todayApplicationStudentIdList = todayStatusList.map { it.studentId } val timeList = timeQueryTeacherSpi.queryTime(today) - val userList = userQueryApplicationSpi.queryUserInfo(todayApplicationStudentIdList) + val userIdRequest = UserInfoRequest(todayApplicationStudentIdList) + val userList = userQueryApplicationSpi.queryUserInfo(userIdRequest) val outing = mutableListOf() @@ -324,7 +326,8 @@ class ApplicationUseCase( val todayPicnicStudentInfoList = queryStatusSpi.queryPicnicStudentInfoListByToday(LocalDate.now()) val todayPicnicStudentIdList = todayPicnicStudentInfoList.map { status -> status.studentId } val timeList = timeQueryTeacherSpi.queryTime(LocalDate.now()) - val userList = userQueryApplicationSpi.queryUserInfo(todayPicnicStudentIdList) + val userIdRequest = UserInfoRequest(todayPicnicStudentIdList) + val userList = userQueryApplicationSpi.queryUserInfo(userIdRequest) val outing: List = todayPicnicStudentInfoList .map { status -> @@ -358,7 +361,8 @@ class ApplicationUseCase( DirectorType.AFTER_SCHOOL -> { val afterSchoolList = queryAfterSchoolSpi.queryAfterSchoolListByClassroomId(classroomId) val afterSchoolStudentIdList = afterSchoolList.map { it.studentId } - val afterSchoolUserInfos = userSpi.queryUserInfo(afterSchoolStudentIdList) + val userIdRequest = UserInfoRequest(afterSchoolStudentIdList) + val afterSchoolUserInfos = userSpi.queryUserInfo(userIdRequest) afterSchoolUserInfos.map { user -> val status = todayStudentStatusList.find { user.id == it.studentId } @@ -378,7 +382,8 @@ class ApplicationUseCase( DirectorType.TUE_CLUB, DirectorType.FRI_CLUB -> { val clubList = queryClubSpi.queryClubListByClassroomId(classroomId) val clubStudentIdList = clubList.map { it.studentId } - val clubUserInfos = userSpi.queryUserInfo(clubStudentIdList) + val userIdRequest = UserInfoRequest(clubStudentIdList) + val clubUserInfos = userSpi.queryUserInfo(userIdRequest) clubUserInfos.map { user -> val status = todayStudentStatusList.find { user.id == it.studentId } @@ -421,7 +426,8 @@ class ApplicationUseCase( override fun savePicnicPass(request: DomainPicnicPassRequest) { val teacherId = userSpi.getCurrentUserId() - val userList = userSpi.queryUserInfo(request.userIdList) + val userIdRequest = UserInfoRequest(request.userIdList) + val userList = userSpi.queryUserInfo(userIdRequest) val statusList = request.userIdList.map { val user = userList.find { user -> user.id == it } @@ -441,7 +447,8 @@ class ApplicationUseCase( override fun savePicnicAcceptOrRefuse(request: DomainPicnicAcceptOrRefuseRequest) { val teacherId = userSpi.getCurrentUserId() - val userList = userSpi.queryUserInfo(request.userIdList) + val userIdRequest = UserInfoRequest(request.userIdList) + val userList = userSpi.queryUserInfo(userIdRequest) val todayAwaitStatusList = queryStatusSpi.queryAwaitStudentListByToday(LocalDate.now()) when (request.type) { diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/classroom/usecase/ClassroomMovementUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/classroom/usecase/ClassroomMovementUseCase.kt index 77839e0d..e8cd801f 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/classroom/usecase/ClassroomMovementUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/classroom/usecase/ClassroomMovementUseCase.kt @@ -32,6 +32,7 @@ import com.pickdsm.pickserverspring.domain.teacher.spi.StatusCommandTeacherSpi import com.pickdsm.pickserverspring.domain.teacher.spi.TimeQueryTeacherSpi import com.pickdsm.pickserverspring.domain.time.exception.TimeNotFoundException import com.pickdsm.pickserverspring.domain.user.User +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.time.DayOfWeek import java.time.LocalDate @@ -116,7 +117,8 @@ class ClassroomMovementUseCase( ): QueryMovementStudentList { val todayMovementStudentInfoList = queryStatusSpi.queryMovementStudentInfoListByToday(LocalDate.now()) val todayMovementStudentIdList = todayMovementStudentInfoList.map { movement -> movement.studentId } - val userList = userQueryApplicationSpi.queryUserInfo(todayMovementStudentIdList) + val userIdRequest = UserInfoRequest(todayMovementStudentIdList) + val userList = userQueryApplicationSpi.queryUserInfo(userIdRequest) val movementStudent = mutableListOf() val studentAttendanceList = adminApi.getTypeByDate(LocalDate.now()) diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/spi/UserQuerySelfStudyDirectorSpi.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/spi/UserQuerySelfStudyDirectorSpi.kt index 661416fa..0a5fad7e 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/spi/UserQuerySelfStudyDirectorSpi.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/spi/UserQuerySelfStudyDirectorSpi.kt @@ -1,9 +1,10 @@ package com.pickdsm.pickserverspring.domain.selfstudydirector.spi import com.pickdsm.pickserverspring.domain.user.User +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import java.util.UUID interface UserQuerySelfStudyDirectorSpi { - fun queryUserInfo(ids: List): List + fun queryUserInfo(request: UserInfoRequest): List } diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/usecase/SelfStudyDirectorUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/usecase/SelfStudyDirectorUseCase.kt index eca91f61..a0ead735 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/usecase/SelfStudyDirectorUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/selfstudydirector/usecase/SelfStudyDirectorUseCase.kt @@ -18,6 +18,7 @@ import com.pickdsm.pickserverspring.domain.selfstudydirector.spi.QuerySelfStudyD import com.pickdsm.pickserverspring.domain.selfstudydirector.spi.QueryTypeSpi import com.pickdsm.pickserverspring.domain.selfstudydirector.spi.UserQuerySelfStudyDirectorSpi import com.pickdsm.pickserverspring.domain.user.User +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.time.LocalDate @@ -34,7 +35,8 @@ class SelfStudyDirectorUseCase( val startDate = LocalDate.of(LocalDate.now().year, month.toInt(), 1) val selfStudyDirectorList = querySelfStudyDirectorSpi.querySelfStudyDirectorByDate(startDate) val teacherIdList = selfStudyDirectorList.map { it.teacherId } - val userInfoList = userQuerySelfStudyDirectorSpi.queryUserInfo(teacherIdList) + val userIdRequest = UserInfoRequest(teacherIdList) + val userInfoList = userQuerySelfStudyDirectorSpi.queryUserInfo(userIdRequest) val typeList = queryTypeSpi.queryTypeListByDate(startDate) // 해당 달의 1일부터 마지막일까지 반복문을 돌면서 값 가공 @@ -60,7 +62,8 @@ class SelfStudyDirectorUseCase( override fun getTodaySelfStudyTeacher(): TodaySelfStudyTeacherResponse { val selfStudyList = querySelfStudyDirectorSpi.querySelfStudyDirectorByToday() val teacherIdList = selfStudyList.map { it.teacherId } - val teacherList = userQuerySelfStudyDirectorSpi.queryUserInfo(teacherIdList) + val userIdRequest = UserInfoRequest(teacherIdList) + val teacherList = userQuerySelfStudyDirectorSpi.queryUserInfo(userIdRequest) return TodaySelfStudyTeacherResponse( secondFloor = getTeacherName(teacherList, selfStudyList, 2), diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/spi/UserQueryTeacherSpi.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/spi/UserQueryTeacherSpi.kt index fb2b0ed6..8ed0edc0 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/spi/UserQueryTeacherSpi.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/spi/UserQueryTeacherSpi.kt @@ -2,11 +2,12 @@ package com.pickdsm.pickserverspring.domain.teacher.spi import com.pickdsm.pickserverspring.domain.user.User import com.pickdsm.pickserverspring.domain.user.dto.UserInfo +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import java.util.UUID interface UserQueryTeacherSpi { - fun queryUserInfo(ids: List): List + fun queryUserInfo(request: UserInfoRequest): List fun queryUserInfoByGradeAndClassNum(grade: Int?, classNum: Int?): List } diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/usecase/TeacherUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/usecase/TeacherUseCase.kt index 03ffe79d..4fb3d6c8 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/usecase/TeacherUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/teacher/usecase/TeacherUseCase.kt @@ -18,6 +18,7 @@ import com.pickdsm.pickserverspring.domain.teacher.api.dto.response.QueryStudent import com.pickdsm.pickserverspring.domain.teacher.spi.StatusCommandTeacherSpi import com.pickdsm.pickserverspring.domain.teacher.spi.TimeQueryTeacherSpi import com.pickdsm.pickserverspring.domain.time.exception.TimeNotFoundException +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.exception.UserNotFoundException import com.pickdsm.pickserverspring.domain.user.spi.UserSpi import java.time.LocalDate @@ -87,8 +88,8 @@ class TeacherUseCase( ?: throw ClassroomNotFoundException val movementStatusList = queryStatusSpi.queryMovementStatusListByTodayAndClassroomId(classroomId) val movementStudentIdList = movementStatusList.map { it.studentId } - - val movementUserInfos = userSpi.queryUserInfo(movementStudentIdList) + val userIdRequest = UserInfoRequest(movementStudentIdList) + val movementUserInfos = userSpi.queryUserInfo(userIdRequest) val movementList = movementStatusList.map { val user = movementUserInfos.find { user -> user.id == it.studentId } diff --git a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/persistence/UserPersistenceAdapter.kt b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/persistence/UserPersistenceAdapter.kt index c12eb54d..a41b2343 100644 --- a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/persistence/UserPersistenceAdapter.kt +++ b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/persistence/UserPersistenceAdapter.kt @@ -1,6 +1,7 @@ package com.pickdsm.pickserverspring.domain.user.persistence import com.pickdsm.pickserverspring.common.feign.client.UserClient +import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.User import com.pickdsm.pickserverspring.domain.user.dto.UserInfo import com.pickdsm.pickserverspring.domain.user.spi.UserSpi @@ -16,11 +17,11 @@ class UserPersistenceAdapter( override fun getCurrentUserId(): UUID = UUID.fromString(SecurityContextHolder.getContext().authentication.name) - override fun queryUserInfo(ids: List): List = - if (ids.isEmpty()) { + override fun queryUserInfo(request: UserInfoRequest): List = + if (request.userIds.isEmpty()) { emptyList() } else { - userClient.getUserInfo(ids) + userClient.getUserInfo(request) .users .map { User( From 20a8e50b5186d6cec4df9962f2c34af05b1e9363 Mon Sep 17 00:00:00 2001 From: min56 Date: Mon, 1 May 2023 22:05:18 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=91=20::=20UserInfoRequest=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/dto/request/UserInfoRequest.kt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt new file mode 100644 index 00000000..9e2a47d9 --- /dev/null +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt @@ -0,0 +1,7 @@ +package com.pickdsm.pickserverspring.domain.user.dto.request + +import java.util.* + +data class UserInfoRequest( + val userIds: List +) From 53eeee4553388f945dba106ad1b6f7817c22fe36 Mon Sep 17 00:00:00 2001 From: min56 Date: Mon, 1 May 2023 22:10:07 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20Ktlint=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/afterschool/usecase/AfterSchoolUseCase.kt | 1 - .../pickserverspring/domain/user/dto/request/UserInfoRequest.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt index 0d3d5edd..68ef4b2f 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/afterschool/usecase/AfterSchoolUseCase.kt @@ -11,7 +11,6 @@ import com.pickdsm.pickserverspring.domain.afterschool.exception.AfterSchoolNotF import com.pickdsm.pickserverspring.domain.afterschool.exception.AfterSchoolStudentExistsException import com.pickdsm.pickserverspring.domain.afterschool.spi.CommandAfterSchoolSpi import com.pickdsm.pickserverspring.domain.afterschool.spi.QueryAfterSchoolSpi -import com.pickdsm.pickserverspring.domain.user.User import com.pickdsm.pickserverspring.domain.user.dto.request.UserInfoRequest import com.pickdsm.pickserverspring.domain.user.exception.UserNotFoundException import com.pickdsm.pickserverspring.domain.user.spi.UserSpi diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt index 9e2a47d9..718e72cf 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/dto/request/UserInfoRequest.kt @@ -3,5 +3,5 @@ package com.pickdsm.pickserverspring.domain.user.dto.request import java.util.* data class UserInfoRequest( - val userIds: List + val userIds: List, ) From 7be22d699c71a75db3687855e6853dedcaa403a7 Mon Sep 17 00:00:00 2001 From: min56 Date: Mon, 1 May 2023 22:10:55 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20@Valid=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pickdsm/pickserverspring/common/feign/client/UserClient.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt index 7da66d63..b395af05 100644 --- a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt +++ b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/common/feign/client/UserClient.kt @@ -11,13 +11,12 @@ import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestParam import java.util.UUID -import javax.validation.Valid @FeignClient(name = "UserClient", url = "\${service.scheme}://\${service.user.host}") interface UserClient { @PostMapping("/users/id") - fun getUserInfo(@Valid @RequestBody request: UserInfoRequest): UserInfoResponse + fun getUserInfo(@RequestBody request: UserInfoRequest): UserInfoResponse @GetMapping("/users/class") fun getUserInfoByGradeAndClassNum(