-
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.
[Refactor]: repository 파일 이동 및 querydsl 메서드 구현
Related to: #559
- Loading branch information
1 parent
e56b2aa
commit 97b719a
Showing
6 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ommunity/AnonymousNicknameRepository.java → ...nonymous/AnonymousNicknameRepository.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
10 changes: 10 additions & 0 deletions
10
.../makers/internal/community/repository/anonymous/AnonymousPostProfileRepositoryCustom.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,10 @@ | ||
package org.sopt.makers.internal.community.repository.anonymous; | ||
|
||
import org.sopt.makers.internal.domain.community.AnonymousPostProfile; | ||
|
||
import java.util.List; | ||
|
||
public interface AnonymousPostProfileRepositoryCustom { | ||
|
||
List<AnonymousPostProfile> findTopByOrderByIdDescWithLimit(int limit); | ||
} |
26 changes: 26 additions & 0 deletions
26
...ers/internal/community/repository/anonymous/AnonymousPostProfileRepositoryCustomImpl.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,26 @@ | ||
package org.sopt.makers.internal.community.repository.anonymous; | ||
|
||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import lombok.RequiredArgsConstructor; | ||
import org.sopt.makers.internal.domain.community.AnonymousPostProfile; | ||
import org.sopt.makers.internal.domain.community.QAnonymousPostProfile; | ||
|
||
import java.util.List; | ||
|
||
@RequiredArgsConstructor | ||
public class AnonymousPostProfileRepositoryCustomImpl implements AnonymousPostProfileRepositoryCustom { | ||
|
||
private final JPAQueryFactory queryFactory; | ||
|
||
@Override | ||
public List<AnonymousPostProfile> findTopByOrderByIdDescWithLimit(int limit) { | ||
|
||
QAnonymousPostProfile anonymousPostProfile = QAnonymousPostProfile.anonymousPostProfile; | ||
|
||
return queryFactory | ||
.selectFrom(anonymousPostProfile) | ||
.orderBy(anonymousPostProfile.createdAt.desc()) | ||
.limit(limit) | ||
.fetch(); | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/java/org/sopt/makers/internal/community/service/AnonymousNicknameServiceUtil.java
This file was deleted.
Oops, something went wrong.
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