-
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.
- Loading branch information
1 parent
67edc98
commit e7c7fa0
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/org/meogo/domain/user/presentation/dto/request/UserCheckRequest.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,5 @@ | ||
package org.meogo.domain.user.presentation.dto.request | ||
|
||
data class UserCheckRequest( | ||
val accountId: String | ||
) |
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/org/meogo/domain/user/service/CheckAccountIdService.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,14 @@ | ||
package org.meogo.domain.user.service | ||
|
||
import org.meogo.domain.user.presentation.dto.request.UserCheckRequest | ||
import org.meogo.domain.user.repository.UserRepository | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class CheckAccountIdService( | ||
private val userRepository: UserRepository | ||
) { | ||
fun execute(request: UserCheckRequest): Boolean { | ||
return userRepository.existsByAccountId(request.accountId) | ||
} | ||
} |