From 1386556629ee49401ea0039604485785a88d4733 Mon Sep 17 00:00:00 2001 From: huuuunee Date: Tue, 9 Jul 2024 23:18:10 +0900 Subject: [PATCH 01/13] =?UTF-8?q?fix:=20=ED=95=99=EC=83=9D=20=ED=8F=BC=20?= =?UTF-8?q?=EC=A0=9C=EC=B6=9C=EC=9D=84=20=ED=95=A0=EB=95=8C=20uuid?= =?UTF-8?q?=EA=B0=80=20=EC=A1=B4=EC=9E=AC=ED=95=A0=EC=8B=9C=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=ED=8F=BC=EC=9C=BC=EB=A1=9C=20=EC=A0=9C=EC=B6=9C?= =?UTF-8?q?=EC=9D=84=20=ED=95=98=EA=B3=A0=20=EC=97=86=EC=9D=84=EC=8B=9C=20?= =?UTF-8?q?active=EB=90=9C=20=ED=8F=BC=EC=9D=84=20=EC=A0=9C=EC=B6=9C?= =?UTF-8?q?=ED=95=98=EA=B2=8C=20=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/usecase/SubmitUserFormDataUseCase.kt | 8 +++++++- .../kotlin/team/msg/sms/global/security/SecurityConfig.kt | 2 +- .../sms/domain/authentication/AuthenticationWebAdapter.kt | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt index 14f07704..09df7b37 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt @@ -6,6 +6,7 @@ import team.msg.sms.domain.authentication.model.FieldType import team.msg.sms.domain.authentication.model.MarkingBoard import team.msg.sms.domain.authentication.model.MarkingBoardType import team.msg.sms.domain.authentication.model.UserFormValue +import team.msg.sms.domain.authentication.service.AuthenticationFormService import team.msg.sms.domain.authentication.service.AuthenticationSectionService import team.msg.sms.domain.authentication.service.MarkingBoardService import team.msg.sms.domain.authentication.service.UserFormValueService @@ -15,11 +16,16 @@ import java.util.* @UseCase class SubmitUserFormDataUseCase( + private val authenticationFormService: AuthenticationFormService, private val userFormValueService: UserFormValueService, private val markingBoardService: MarkingBoardService, private val studentService: StudentService ) { - fun execute(submitDataList: List, authenticationFormId: UUID) { + fun execute(submitDataList: List, uuid: String?) { + val authenticationFormId = + if (uuid.equals(null)) authenticationFormService.getActiveAuthenticationFormId() + else UUID.fromString(uuid) + val student = studentService.currentStudent() val userFormValues = submitDataList.flatMap { submitData -> diff --git a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt index e3b479ff..c4f8a781 100644 --- a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt +++ b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt @@ -100,7 +100,7 @@ class SecurityConfig( .antMatchers(HttpMethod.GET, "/authentication").hasAuthority(TEACHER) .antMatchers(HttpMethod.PUT, "/authentication/{uuid}").hasAuthority(STUDENT) .antMatchers(HttpMethod.POST, "/authentication").hasAuthority(STUDENT) - .antMatchers(HttpMethod.POST, "/authentication/submit/{uuid}").hasAuthority(STUDENT) + .antMatchers(HttpMethod.POST, "/authentication/submit").hasAuthority(STUDENT) .antMatchers(HttpMethod.POST, "/authentication/create").hasAuthority(TEACHER) .antMatchers(HttpMethod.POST, "/authentication/grading/{markingBoardId}").hasAuthority(TEACHER) .antMatchers(HttpMethod.PATCH, "/authentication/teacher/{uuid}/approve").hasAuthority(TEACHER) diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt index 21ce1130..d804494c 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt @@ -64,12 +64,12 @@ class AuthenticationWebAdapter( queryStudentAuthenticationFormDetailUseCase.execute(UUID.fromString(uuid)) .let { ResponseEntity.ok(it.toResponse()) } - @PostMapping("/submit/{uuid}") + @PostMapping("/submit") fun submitUserFormValue( @RequestBody request: SubmitUserFormDataWebRequest, - @PathVariable uuid: String + @RequestParam uuid: String? ): ResponseEntity = - submitUserFormDataUseCase.execute(request.contents, UUID.fromString(uuid)) + submitUserFormDataUseCase.execute(request.contents, uuid) .let { ResponseEntity.ok().build() } @PostMapping("/create") From 7338056fe109d0fdfa74a81332e95486b0452716 Mon Sep 17 00:00:00 2001 From: huuuunee Date: Tue, 9 Jul 2024 23:52:39 +0900 Subject: [PATCH 02/13] =?UTF-8?q?fix:=20uuid=20name=20=EC=A7=80=EC=A0=95?= =?UTF-8?q?=20=EB=B0=8F=20null=EB=A1=9C=20=EB=B0=9B=EC=9D=84=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EA=B2=8C=20=ED=95=A9=EB=8B=88=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msg/sms/domain/authentication/AuthenticationWebAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt index d804494c..0671b476 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt @@ -67,7 +67,7 @@ class AuthenticationWebAdapter( @PostMapping("/submit") fun submitUserFormValue( @RequestBody request: SubmitUserFormDataWebRequest, - @RequestParam uuid: String? + @RequestParam(name = "uuid", required = false) uuid: String? ): ResponseEntity = submitUserFormDataUseCase.execute(request.contents, uuid) .let { ResponseEntity.ok().build() } From 660593021056da6dad5841f3d8cdbe06ba3bd24d Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 00:20:53 +0900 Subject: [PATCH 03/13] =?UTF-8?q?fix:=20verity=20->=20verify=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/kotlin/team/msg/sms/global/security/SecurityConfig.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt index c4f8a781..80dd2db4 100644 --- a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt +++ b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt @@ -49,7 +49,7 @@ class SecurityConfig( .antMatchers(HttpMethod.GET, "/health").permitAll() // Auth - .antMatchers(HttpMethod.GET, "/auth/verity/access").authenticated() + .antMatchers(HttpMethod.GET, "/auth/verify/access").authenticated() .antMatchers(HttpMethod.POST, "/auth").permitAll() .antMatchers(HttpMethod.PATCH, "/auth").permitAll() .antMatchers(HttpMethod.DELETE, "/auth").authenticated() From 14f8b7c41f81a9f5ec02c9beb19fe4e28dc4dd8d Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:11:57 +0900 Subject: [PATCH 04/13] =?UTF-8?q?fix:=20MarkingBoard=EC=97=90=20=EC=B1=84?= =?UTF-8?q?=EC=A0=90=20=EC=84=A0=EC=83=9D=EB=8B=98=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msg/sms/domain/authentication/model/MarkingBoard.kt | 3 ++- .../authentication/entity/MarkingBoardJpaEntity.kt | 4 +++- .../persistence/authentication/mapper/MarkingBoardMapper.kt | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/model/MarkingBoard.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/model/MarkingBoard.kt index f9d10a1b..33808618 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/model/MarkingBoard.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/model/MarkingBoard.kt @@ -8,5 +8,6 @@ data class MarkingBoard( val authenticationId: UUID, val studentId: UUID, val totalScore: Double = 0.0, - val markingBoardType: MarkingBoardType + val markingBoardType: MarkingBoardType, + val graderName: String? ) diff --git a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/entity/MarkingBoardJpaEntity.kt b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/entity/MarkingBoardJpaEntity.kt index 9b43a52d..06fb5e57 100644 --- a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/entity/MarkingBoardJpaEntity.kt +++ b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/entity/MarkingBoardJpaEntity.kt @@ -27,5 +27,7 @@ class MarkingBoardJpaEntity( val totalScore: Double, @Enumerated(EnumType.STRING) - val markingBoardType : MarkingBoardType + val markingBoardType : MarkingBoardType, + + val graderName: String? ): BaseUuidEntity(id) \ No newline at end of file diff --git a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/mapper/MarkingBoardMapper.kt b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/mapper/MarkingBoardMapper.kt index 2a272075..e90fc415 100644 --- a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/mapper/MarkingBoardMapper.kt +++ b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/mapper/MarkingBoardMapper.kt @@ -10,7 +10,8 @@ fun MarkingBoardJpaEntity.toDomain() = studentId = studentId, title = title, totalScore = totalScore, - markingBoardType = markingBoardType + markingBoardType = markingBoardType, + graderName = graderName ) fun MarkingBoard.toEntity() = @@ -20,5 +21,6 @@ fun MarkingBoard.toEntity() = studentId = studentId, title = title, totalScore = totalScore, - markingBoardType = markingBoardType + markingBoardType = markingBoardType, + graderName = graderName ) \ No newline at end of file From 2a49a6f019c2bbd8b2f9c6745bf4ef9c91614c3e Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:12:57 +0900 Subject: [PATCH 05/13] =?UTF-8?q?add:=20=ED=95=99=EC=83=9D=20Id=EB=A1=9C?= =?UTF-8?q?=20MarkingBoard=20=EC=B0=BE=EC=95=84=EC=98=A4=EB=8A=94=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/GetMarkingBoardService.kt | 1 + .../impl/GetMarkingBoardServiceImpl.kt | 3 +++ .../spi/QueryMarkingBoardPort.kt | 1 + .../MarkingBoardPersistenceAdapter.kt | 3 +++ .../queryDSL/MarkingBoardCustomRepository.kt | 3 +++ .../queryDSL/MarkingBoardRepositoryImpl.kt | 19 +++++++++++++++++++ 6 files changed, 30 insertions(+) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/GetMarkingBoardService.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/GetMarkingBoardService.kt index 9b88f3e3..e27a0ef5 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/GetMarkingBoardService.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/GetMarkingBoardService.kt @@ -6,6 +6,7 @@ import team.msg.sms.domain.authentication.model.MarkingBoardType import java.util.* interface GetMarkingBoardService { + fun verifyMarkingBoardByStudentId(studentId: UUID): MarkingBoard? fun getMarkingBoardById(id: UUID): MarkingBoard fun getMarkingBoardByStudentIds( studentIds: List, diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/impl/GetMarkingBoardServiceImpl.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/impl/GetMarkingBoardServiceImpl.kt index 88db020d..6c271098 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/impl/GetMarkingBoardServiceImpl.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/service/impl/GetMarkingBoardServiceImpl.kt @@ -14,6 +14,9 @@ import java.util.UUID class GetMarkingBoardServiceImpl( private val markingBoardPort: MarkingBoardPort ) : GetMarkingBoardService { + override fun verifyMarkingBoardByStudentId(studentId: UUID): MarkingBoard? = + markingBoardPort.verifyMarkingBoardByStudentId(studentId) + override fun getMarkingBoardById(id: UUID): MarkingBoard { return markingBoardPort.queryMarkingBoardById(id) ?: throw MarkingBoardNotFoundException } diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/spi/QueryMarkingBoardPort.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/spi/QueryMarkingBoardPort.kt index 4738dbba..bda58e48 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/spi/QueryMarkingBoardPort.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/spi/QueryMarkingBoardPort.kt @@ -6,6 +6,7 @@ import team.msg.sms.domain.authentication.model.MarkingBoardType import java.util.UUID interface QueryMarkingBoardPort { + fun verifyMarkingBoardByStudentId(studentId: UUID): MarkingBoard? fun queryMarkingBoardById(id: UUID): MarkingBoard? fun queryMarkingBoardByStudentIds( studentIds: List, diff --git a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/MarkingBoardPersistenceAdapter.kt b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/MarkingBoardPersistenceAdapter.kt index 17e9d182..5e2b37ad 100644 --- a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/MarkingBoardPersistenceAdapter.kt +++ b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/MarkingBoardPersistenceAdapter.kt @@ -21,6 +21,9 @@ class MarkingBoardPersistenceAdapter( markingBoardJpaRepository.save(markingBoard.toEntity()) } + override fun verifyMarkingBoardByStudentId(studentId: UUID): MarkingBoard? = + markingBoardCustomRepository.findMarkingBoardWithStudentId(studentId)?.toDomain() + override fun queryMarkingBoardById(id: UUID): MarkingBoard? = markingBoardJpaRepository.findByIdOrNull(id)?.toDomain() diff --git a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardCustomRepository.kt b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardCustomRepository.kt index 7d86cdd3..19f47bb4 100644 --- a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardCustomRepository.kt +++ b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardCustomRepository.kt @@ -2,9 +2,12 @@ package team.msg.sms.persistence.authentication.repository.queryDSL import team.msg.sms.domain.authentication.dto.res.UserBoardPageResponseData import team.msg.sms.domain.authentication.model.MarkingBoardType +import team.msg.sms.persistence.authentication.entity.MarkingBoardJpaEntity import java.util.* interface MarkingBoardCustomRepository { + fun findMarkingBoardWithStudentId(studentId: UUID): MarkingBoardJpaEntity? + fun findMarkingBoardWithStudentInfoByStudentIds( studentIds: List, authenticationId: UUID, diff --git a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardRepositoryImpl.kt b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardRepositoryImpl.kt index bf158f66..8dc15fa6 100644 --- a/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardRepositoryImpl.kt +++ b/sms-persistence/src/main/kotlin/team/msg/sms/persistence/authentication/repository/queryDSL/MarkingBoardRepositoryImpl.kt @@ -7,7 +7,10 @@ import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Repository import team.msg.sms.domain.authentication.dto.res.UserBoardPageResponseData import team.msg.sms.domain.authentication.dto.res.UserBoardWithStudentInfoResponseData +import team.msg.sms.domain.authentication.model.MarkingBoard import team.msg.sms.domain.authentication.model.MarkingBoardType +import team.msg.sms.persistence.authentication.entity.MarkingBoardJpaEntity +import team.msg.sms.persistence.authentication.entity.QAuthenticationFormJpaEntity import team.msg.sms.persistence.authentication.entity.QMarkingBoardJpaEntity import team.msg.sms.persistence.student.entity.QStudentJpaEntity import team.msg.sms.persistence.user.entity.QUserJpaEntity @@ -17,6 +20,22 @@ import java.util.* class MarkingBoardRepositoryImpl( private val jpaQueryFactory: JPAQueryFactory ) : MarkingBoardCustomRepository { + override fun findMarkingBoardWithStudentId(studentId: UUID): MarkingBoardJpaEntity? { + val qMarkingBoard = QMarkingBoardJpaEntity.markingBoardJpaEntity + val qAuthenticationForm = QAuthenticationFormJpaEntity.authenticationFormJpaEntity + val data = jpaQueryFactory + .select(qMarkingBoard) + .from(qMarkingBoard) + .join(qAuthenticationForm).on(qMarkingBoard.authenticationId.eq(qAuthenticationForm.id)) + .where( + qMarkingBoard.studentId.eq(studentId) + .and(qAuthenticationForm.active.isTrue) + ) + .fetch() + return if (data.isEmpty()) null else { + data.first() + } + } override fun findMarkingBoardWithStudentInfoByStudentIds( studentIds: List, From 5e4a5fbfd5c505c1ef552e8692f0ba54f2de5b57 Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:13:14 +0900 Subject: [PATCH 06/13] =?UTF-8?q?add:=20=EC=B1=84=EC=A0=90=20=ED=95=A0?= =?UTF-8?q?=EB=95=8C=20=EC=B1=84=EC=A0=90=EC=9E=90=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usecase/GradingAuthenticationFormUseCase.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/GradingAuthenticationFormUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/GradingAuthenticationFormUseCase.kt index 444d9e18..2a76a1df 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/GradingAuthenticationFormUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/GradingAuthenticationFormUseCase.kt @@ -10,6 +10,7 @@ import team.msg.sms.domain.authentication.service.MarkingBoardService import team.msg.sms.domain.authentication.service.MarkingValueService import team.msg.sms.domain.authentication.service.UserFormValueService import team.msg.sms.domain.teacher.service.TeacherService +import team.msg.sms.domain.user.service.UserService import java.time.LocalDateTime import java.util.UUID @@ -18,7 +19,8 @@ class GradingAuthenticationFormUseCase( private val markingValueService: MarkingValueService, private val markingBoardService: MarkingBoardService, private val userFormValueService: UserFormValueService, - private val teacherService: TeacherService + private val teacherService: TeacherService, + private val userService: UserService ) { fun execute(markingBoardId: UUID, gradingDataList: List) { //요청한 setId 들 중 실제 userFormValue 테이블에 없는 setId 일 경우 최종점수에 영향을 미칠 수 있어 예외처리 @@ -26,6 +28,8 @@ class GradingAuthenticationFormUseCase( val teacher = teacherService.currentTeacher() + val user = userService.getUserById(teacher.userId) + val markingValueList = markingValueService.findMarkingValueListByMarkingBoardId(markingBoardId) val markingValueMap = markingValueList.associateBy { it.setId } @@ -55,7 +59,8 @@ class GradingAuthenticationFormUseCase( markingBoardService.save( markingBoard.copy( totalScore = totalScore, - markingBoardType = MarkingBoardType.COMPLETED + markingBoardType = MarkingBoardType.COMPLETED, + graderName = user.name ) ) } From 2a0c87b9405126d4f9256c8ceb82d6000c357cbe Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:13:25 +0900 Subject: [PATCH 07/13] =?UTF-8?q?add:=20=EC=A0=9C=EC=B6=9C=ED=95=A0?= =?UTF-8?q?=EB=95=8C=20=EC=B1=84=EC=A0=90=EC=9E=90=20null=EB=A1=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/authentication/usecase/SubmitUserFormDataUseCase.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt index 09df7b37..27223a1b 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/SubmitUserFormDataUseCase.kt @@ -52,6 +52,7 @@ class SubmitUserFormDataUseCase( markingBoardType = MarkingBoardType.PENDING_REVIEW, authenticationId = authenticationFormId, studentId = student.id, + graderName = null ) markingBoardService.save(markingBoard) } From d0f97aaed92dbd486cbabbe4ea071945fcd9188a Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:13:42 +0900 Subject: [PATCH 08/13] =?UTF-8?q?add:=20api=20SecurityConfig=20=EC=97=90?= =?UTF-8?q?=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/kotlin/team/msg/sms/global/security/SecurityConfig.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt index 80dd2db4..c5f50d32 100644 --- a/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt +++ b/sms-infrastructure/src/main/kotlin/team/msg/sms/global/security/SecurityConfig.kt @@ -98,6 +98,7 @@ class SecurityConfig( .antMatchers(HttpMethod.GET, "/authentication/form").hasAnyAuthority(STUDENT, TEACHER) .antMatchers(HttpMethod.GET, "/authentication/{uuid}/form").hasAuthority(TEACHER) .antMatchers(HttpMethod.GET, "/authentication").hasAuthority(TEACHER) + .antMatchers(HttpMethod.GET, "/authentication/verify").hasAuthority(STUDENT) .antMatchers(HttpMethod.PUT, "/authentication/{uuid}").hasAuthority(STUDENT) .antMatchers(HttpMethod.POST, "/authentication").hasAuthority(STUDENT) .antMatchers(HttpMethod.POST, "/authentication/submit").hasAuthority(STUDENT) From 3b6fbe7e6cb47a20ab3775b6ac358f5493f707e5 Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:13:59 +0900 Subject: [PATCH 09/13] =?UTF-8?q?add:=20=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=EB=A5=BC=20=EB=8B=B4=EC=9D=80=20RequestDTO?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/res/QueryAuthenticationVerifyResponseData.kt | 10 ++++++++++ .../dto/res/QueryAuthenticationVerifyWebResponse.kt | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sms-core/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyResponseData.kt create mode 100644 sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyWebResponse.kt diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyResponseData.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyResponseData.kt new file mode 100644 index 00000000..4ea6ceaf --- /dev/null +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyResponseData.kt @@ -0,0 +1,10 @@ +package team.msg.sms.domain.authentication.dto.res + +import team.msg.sms.domain.authentication.model.MarkingBoardType + +data class QueryAuthenticationVerifyResponseData( + val name: String, + val score: Double, + val grader: String?, + val markingBoardType: MarkingBoardType +) diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyWebResponse.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyWebResponse.kt new file mode 100644 index 00000000..14b28e39 --- /dev/null +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyWebResponse.kt @@ -0,0 +1,10 @@ +package team.msg.sms.domain.authentication.dto.res + +import team.msg.sms.domain.authentication.model.MarkingBoardType + +data class QueryAuthenticationVerifyWebResponse( + val name: String, + val score: Double, + val grader: String?, + val markingBoardType: MarkingBoardType +) From 5e34f5bacda670a48110d3cd8f05dc0756491cab Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:14:15 +0900 Subject: [PATCH 10/13] =?UTF-8?q?add:=20=ED=95=99=EC=83=9D=EC=9D=98=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=EC=A0=9C=EB=A5=BC=20=EA=B2=80=EC=A6=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=20UseCase=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QueryAuthenticationVerifyUseCase.kt | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/QueryAuthenticationVerifyUseCase.kt diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/QueryAuthenticationVerifyUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/QueryAuthenticationVerifyUseCase.kt new file mode 100644 index 00000000..8b52ac18 --- /dev/null +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase/QueryAuthenticationVerifyUseCase.kt @@ -0,0 +1,35 @@ +package team.msg.sms.domain.authentication.usecase + +import team.msg.sms.common.annotation.ReadOnlyUseCase +import team.msg.sms.domain.authentication.dto.res.QueryAuthenticationVerifyResponseData +import team.msg.sms.domain.authentication.model.MarkingBoardType +import team.msg.sms.domain.authentication.service.MarkingBoardService +import team.msg.sms.domain.student.service.StudentService + +@ReadOnlyUseCase +class QueryAuthenticationVerifyUseCase( + private val studentService: StudentService, + private val markingBoardService: MarkingBoardService +) { + fun execute(): QueryAuthenticationVerifyResponseData { + val student = studentService.currentStudent() + val markingBoard = markingBoardService.verifyMarkingBoardByStudentId(student.id) + + return if (markingBoard == null) { + QueryAuthenticationVerifyResponseData( + name = student.name, + score = 0.0, + grader = null, + markingBoardType = MarkingBoardType.NOT_SUBMITTED + ) + } else { + QueryAuthenticationVerifyResponseData( + name = student.name, + score = markingBoard.totalScore, + grader = markingBoard.graderName, + markingBoardType = markingBoard.markingBoardType + ) + } + + } +} \ No newline at end of file From 297b2f8144b71eb91f1faded96e3572842d694cd Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:14:38 +0900 Subject: [PATCH 11/13] =?UTF-8?q?add:=20/verify=20API=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/AuthenticationWebAdapter.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt index 0671b476..e3d5aed4 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt @@ -32,8 +32,14 @@ class AuthenticationWebAdapter( private val createAuthenticationFormUseCase: CreateAuthenticationFormUseCase, private val queryStudentFormListUseCase: QueryStudentFormListUseCase, private val queryStudentAuthenticationFormDetailUseCase: QueryStudentAuthenticationFormDetailUseCase, - private val gradingAuthenticationFormUseCase: GradingAuthenticationFormUseCase + private val gradingAuthenticationFormUseCase: GradingAuthenticationFormUseCase, + private val queryAuthenticationVerifyUseCase: QueryAuthenticationVerifyUseCase ) { + @GetMapping("/verify") + fun verifyStudentAuthenticationForm(): ResponseEntity = + queryAuthenticationVerifyUseCase.execute() + .let { ResponseEntity.ok(it.toResponse()) } + @GetMapping("/form") fun queryAuthenticationForm(): ResponseEntity = queryAuthenticationFormUseCase.execute() @@ -248,6 +254,14 @@ class AuthenticationWebAdapter( content = content ) + private fun QueryAuthenticationVerifyResponseData.toResponse() = + QueryAuthenticationVerifyWebResponse( + name = name, + score = score, + grader = grader, + markingBoardType = markingBoardType + ) + private fun isValidUUID(uuid: String): Boolean { return try { UUID.fromString(uuid) From f08789962662038a786fd0c317a92c8a00233216 Mon Sep 17 00:00:00 2001 From: seungwon7308 Date: Fri, 12 Jul 2024 02:06:35 +0900 Subject: [PATCH 12/13] =?UTF-8?q?fix=20:=20=08=ED=95=99=EC=83=9D=20?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4=20Url=20=ED=95=84?= =?UTF-8?q?=EC=88=98=20=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/res/DetailStudentInfoTeacherResponseData.kt | 2 +- .../dto/res/DetailStudentInfoTokenResponseData.kt | 2 +- .../student/usecase/ModifyStudentInfoUseCase.kt | 2 +- .../student/usecase/StudentInfoTeacherUseCase.kt | 11 ++++++++++- .../domain/student/usecase/StudentInfoTokenUseCase.kt | 10 +++++++++- .../user/dto/res/UserProfileDetailResponseData.kt | 2 +- .../usecase/QueryCurrentUserProfileDetailUseCase.kt | 10 +++++++++- .../dto/res/DetailStudentInfoTeacherWebResponse.kt | 2 +- .../dto/res/DetailStudentInfoTokenWebResponse.kt | 2 +- 9 files changed, 34 insertions(+), 9 deletions(-) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherResponseData.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherResponseData.kt index 8a1826d2..4bedbb52 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherResponseData.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherResponseData.kt @@ -10,7 +10,7 @@ import team.msg.sms.domain.student.model.MilitaryService data class DetailStudentInfoTeacherResponseData( val name: String, val introduce: String, - val portfolioUrl: String?, + val portfolioUrl: String, val portfolioFileUrl: String?, val grade: Int, val classNum: Int, diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenResponseData.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenResponseData.kt index 4ff0745e..c6f3079c 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenResponseData.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenResponseData.kt @@ -10,7 +10,7 @@ import team.msg.sms.domain.student.model.MilitaryService data class DetailStudentInfoTokenResponseData( val name: String, val introduce: String, - val portfolioUrl: String?, + val portfolioUrl: String, val portfolioFileUrl: String?, val grade: Int, val classNum: Int, diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt index 79841228..a872edeb 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt @@ -71,7 +71,7 @@ class ModifyStudentInfoUseCase( val checkStudentMismatch = studentService.checkStudentDataMismatch(student, modifyStudentInfoDataModel) if (checkStudentMismatch) { val portfolioFileUrl = - if(student.portfolioUrl != modifyStudentInfoDataModel.portfolioUrl + if(student.portfolioUrl != modifyStudentInfoDataModel.portfolioUrl // true && true) //해당 데이터가 다르면서 수정 데이터는 있으면 null && modifyStudentInfoData.portfolioUrl != null) null else student.portfolioFileUrl diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTeacherUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTeacherUseCase.kt index 5f66f9b3..0d19b3a5 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTeacherUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTeacherUseCase.kt @@ -13,6 +13,7 @@ import team.msg.sms.domain.project.service.ProjectService import team.msg.sms.domain.project.service.ProjectTechStackService import team.msg.sms.domain.region.service.RegionService import team.msg.sms.domain.student.dto.res.DetailStudentInfoTeacherResponseData +import team.msg.sms.domain.student.model.Student import team.msg.sms.domain.student.model.StudentTechStack import team.msg.sms.domain.student.service.StudentService import team.msg.sms.domain.student.service.StudentTechStackService @@ -48,7 +49,7 @@ class StudentInfoTeacherUseCase( return DetailStudentInfoTeacherResponseData( name = student.name, introduce = student.introduce, - portfolioUrl = student.portfolioUrl, + portfolioUrl = getStudentPortfolioUrl(student), portfolioFileUrl = student.portfolioFileUrl, grade = student.stuNum.substring(0, 1).toInt(), classNum = student.stuNum.substring(1, 2).toInt(), @@ -90,5 +91,13 @@ class StudentInfoTeacherUseCase( private fun toStudentTechStacks(techStacks: List, studentTechStack: StudentTechStack): TechStack? = techStacks.find { it.id == studentTechStack.techStackId } + + private fun getStudentPortfolioUrl(student: Student.StudentWithUserInfo): String { + return when { + !student.portfolioUrl.isNullOrBlank() -> student.portfolioUrl + !student.portfolioFileUrl.isNullOrBlank() -> student.portfolioFileUrl + else -> "" + } + } } diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTokenUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTokenUseCase.kt index 5db78519..09cb1396 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTokenUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/StudentInfoTokenUseCase.kt @@ -52,7 +52,7 @@ class StudentInfoTokenUseCase( return DetailStudentInfoTokenResponseData( name = student.name, introduce = student.introduce, - portfolioUrl = student.portfolioUrl, + portfolioUrl = getStudentPortfolioUrl(student), portfolioFileUrl = student.portfolioFileUrl, grade = student.stuNum.substring(0, 1).toInt(), classNum = student.stuNum.substring(1, 2).toInt(), @@ -94,5 +94,13 @@ class StudentInfoTokenUseCase( private fun toStudentTechStacks(techStacks: List, studentTechStack: StudentTechStack): TechStack? = techStacks.find { it.id == studentTechStack.techStackId } + + private fun getStudentPortfolioUrl(student: Student.StudentWithUserInfo): String { + return when { + !student.portfolioUrl.isNullOrBlank() -> student.portfolioUrl + !student.portfolioFileUrl.isNullOrBlank() -> student.portfolioFileUrl + else -> "" + } + } } diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/user/dto/res/UserProfileDetailResponseData.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/user/dto/res/UserProfileDetailResponseData.kt index 426caf4f..180a78ef 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/user/dto/res/UserProfileDetailResponseData.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/user/dto/res/UserProfileDetailResponseData.kt @@ -10,7 +10,7 @@ import team.msg.sms.domain.student.model.MilitaryService data class UserProfileDetailResponseData( val name: String, val introduce: String, - val portfolioUrl: String?, + val portfolioUrl: String, val portfolioFileUrl: String?, val grade: Int, val classNum: Int, diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/user/usecase/QueryCurrentUserProfileDetailUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/user/usecase/QueryCurrentUserProfileDetailUseCase.kt index 17cd0337..d1fd122f 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/user/usecase/QueryCurrentUserProfileDetailUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/user/usecase/QueryCurrentUserProfileDetailUseCase.kt @@ -73,7 +73,7 @@ class QueryCurrentUserProfileDetailUseCase( UserProfileDetailResponseData( name = student.name, introduce = student.introduce, - portfolioUrl = student.portfolioUrl, + portfolioUrl = getStudentPortfolioUrl(student), portfolioFileUrl = student.portfolioFileUrl, grade = student.stuNum.substring(0, 1).toInt(), classNum = student.stuNum.substring(1, 2).toInt(), @@ -113,4 +113,12 @@ class QueryCurrentUserProfileDetailUseCase( private fun toStudentTechStacks(techStacks: List, studentTechStack: StudentTechStack): TechStack? = techStacks.find { it.id == studentTechStack.techStackId } + + private fun getStudentPortfolioUrl(student: Student.StudentWithUserInfo): String { + return when { + !student.portfolioUrl.isNullOrBlank() -> student.portfolioUrl + !student.portfolioFileUrl.isNullOrBlank() -> student.portfolioFileUrl + else -> "" + } + } } \ No newline at end of file diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherWebResponse.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherWebResponse.kt index 27d9a1fc..04aa0e65 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherWebResponse.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTeacherWebResponse.kt @@ -10,7 +10,7 @@ import team.msg.sms.domain.student.model.MilitaryService data class DetailStudentInfoTeacherWebResponse( val name: String, val introduce: String, - val portfolioUrl: String?, + val portfolioUrl: String, val portfolioFileUrl: String?, val grade: Int, val classNum: Int, diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenWebResponse.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenWebResponse.kt index 49a53095..5632a84d 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenWebResponse.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/student/dto/res/DetailStudentInfoTokenWebResponse.kt @@ -10,7 +10,7 @@ import team.msg.sms.domain.student.model.MilitaryService data class DetailStudentInfoTokenWebResponse( val name: String, val introduce: String, - val portfolioUrl: String?, + val portfolioUrl: String, val portfolioFileUrl: String?, val grade: Int, val classNum: Int, From 8a928ec8a9fdfa1904aa44219331a732102c8b48 Mon Sep 17 00:00:00 2001 From: seungwon7308 <78971821+louis7308@users.noreply.github.com> Date: Fri, 12 Jul 2024 02:19:31 +0900 Subject: [PATCH 13/13] =?UTF-8?q?add:=20=EC=A1=B8=EC=97=85=EC=9E=90?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20=ED=9B=84=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt index a872edeb..eb9e9a74 100644 --- a/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt +++ b/sms-core/src/main/kotlin/team/msg/sms/domain/student/usecase/ModifyStudentInfoUseCase.kt @@ -299,6 +299,7 @@ class ModifyStudentInfoUseCase( } else -> when (departmentCode) { + "0" -> Department.SW_DEVELOPMENT "1", "2" -> Department.SW_DEVELOPMENT "3", "4" -> Department.SMART_IOT_DEVELOPMENT else -> throw StuNumNotRightException