generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #403 from GSM-MSG/develop
지금까지의 변경상황을 마스터로 머지합니다
- Loading branch information
Showing
25 changed files
with
165 additions
and
22 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...otlin/team/msg/sms/domain/authentication/dto/res/QueryAuthenticationVerifyResponseData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ain/kotlin/team/msg/sms/domain/authentication/usecase/QueryAuthenticationVerifyUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
) | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.