-
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
f046ab6
commit f6e7e75
Showing
6 changed files
with
28 additions
and
149 deletions.
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
src/main/java/com/mallang/auth/query/BasicAuthQueryService.java
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,18 @@ | ||
package com.mallang.auth.query; | ||
|
||
import com.mallang.auth.query.repository.BasicMemberQueryRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@RequiredArgsConstructor | ||
@Transactional(readOnly = true) | ||
@Service | ||
public class BasicAuthQueryService { | ||
|
||
private final BasicMemberQueryRepository basicMemberQueryRepository; | ||
|
||
public boolean checkDuplicatedUsername(String username) { | ||
return basicMemberQueryRepository.existsByUsername(username); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/mallang/auth/query/repository/BasicMemberQueryRepository.java
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,9 @@ | ||
package com.mallang.auth.query.repository; | ||
|
||
import com.mallang.auth.domain.BasicMember; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface BasicMemberQueryRepository extends JpaRepository<BasicMember, Long> { | ||
|
||
boolean existsByUsername(String username); | ||
} |
2 changes: 1 addition & 1 deletion
2
...tion/response/CheckDuplicateResponse.java → ...uery/response/CheckDuplicateResponse.java
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