1
1
package team.comit.simtong.domain.common
2
2
3
+ import org.hibernate.validator.constraints.Range
3
4
import org.springframework.http.HttpStatus
4
5
import org.springframework.validation.annotation.Validated
5
6
import org.springframework.web.bind.annotation.*
6
7
import team.comit.simtong.domain.auth.dto.TokenResponse
7
8
import team.comit.simtong.domain.auth.usecase.ReissueTokenUseCase
8
9
import team.comit.simtong.domain.common.dto.request.ChangePasswordWebRequest
9
- import team.comit.simtong.domain.common.dto.request.CheckMatchedAccountWebRequest
10
10
import team.comit.simtong.domain.common.dto.request.FindEmployeeNumberWebRequest
11
11
import team.comit.simtong.domain.common.dto.request.ResetPasswordWebRequest
12
12
import team.comit.simtong.domain.common.dto.response.FindEmployeeNumberWebResponse
@@ -24,6 +24,7 @@ import team.comit.simtong.domain.user.usecase.CheckMatchedAccountUseCase
24
24
import team.comit.simtong.domain.user.usecase.ComparePasswordUseCase
25
25
import team.comit.simtong.domain.user.usecase.FindEmployeeNumberUseCase
26
26
import team.comit.simtong.domain.user.usecase.ResetPasswordUseCase
27
+ import team.comit.simtong.domain.user.value.EmployeeNumber
27
28
import team.comit.simtong.domain.user.value.Password
28
29
import java.util.UUID
29
30
import javax.validation.Valid
@@ -36,7 +37,7 @@ import javax.validation.constraints.NotBlank
36
37
*
37
38
* @author Chokyunghyeon
38
39
* @date 2022/09/11
39
- * @version 1.0.0
40
+ * @version 1.2.4
40
41
**/
41
42
@Validated
42
43
@RestController
@@ -100,11 +101,16 @@ class WebCommonAdapter(
100
101
}
101
102
102
103
@GetMapping(" /account/existence" )
103
- fun checkMatchedAccount (@Valid @ModelAttribute request : CheckMatchedAccountWebRequest ) {
104
+ fun checkMatchedAccount (
105
+ @Range(min = EmployeeNumber .MIN_VALUE , max = EmployeeNumber .MAX_VALUE )
106
+ @RequestParam employeeNumber : EmployeeNumber ,
107
+ @NotBlank @Email
108
+ @RequestParam email : String
109
+ ) {
104
110
checkMatchedAccountUseCase.execute(
105
111
CheckMatchedAccountRequest (
106
- employeeNumber = request. employeeNumber.value,
107
- email = request. email
112
+ employeeNumber = employeeNumber.value,
113
+ email = email
108
114
)
109
115
)
110
116
}
0 commit comments