-
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] querydsl 및 프로젝션 적용 (#155)
* [refactor] #154 add required dependencies * [refactor] #154 create querydsl configuration file * [refactor] #154 create projection and delete unnecessary dto * [refactor] #154 change to querydsl * [refactor] #154 change to querydsl and delete unnecessary code * [refactor] #154 latecomer query changed to querydsl * [refactor] #154 delete unnecessary code * [refactor] #154 change DTO mapping to Projection-based mapping
- Loading branch information
Showing
21 changed files
with
226 additions
and
162 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
9 changes: 0 additions & 9 deletions
9
src/main/java/org/kkumulkkum/server/api/meeting/dto/MeetingMetCountDto.java
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
...main/java/org/kkumulkkum/server/api/meeting/dto/projection/MeetingMetCountProjection.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,11 @@ | ||
package org.kkumulkkum.server.api.meeting.dto.projection; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public interface MeetingMetCountProjection { | ||
Long getId(); | ||
String getName(); | ||
LocalDateTime getCreatedAt(); | ||
String getInvitationCode(); | ||
Long getMetCount(); | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/org/kkumulkkum/server/api/meeting/dto/projection/MemberProjection.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,7 @@ | ||
package org.kkumulkkum.server.api.meeting.dto.projection; | ||
|
||
public interface MemberProjection { | ||
Long getMemberId(); | ||
String getName(); | ||
String getProfileImg(); | ||
} |
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
15 changes: 0 additions & 15 deletions
15
src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MemberDto.java
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MembersDto.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
33 changes: 0 additions & 33 deletions
33
src/main/java/org/kkumulkkum/server/api/participant/dto/ParticipantStatusUserInfoDto.java
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...kkumulkkum/server/api/participant/dto/projection/ParticipantStatusUserInfoProjection.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,15 @@ | ||
package org.kkumulkkum.server.api.participant.dto.projection; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record ParticipantStatusUserInfoProjection( | ||
Long participantId, | ||
Long memberId, | ||
String name, | ||
String profileImg, | ||
LocalDateTime preparationAt, | ||
LocalDateTime departureAt, | ||
LocalDateTime arrivalAt, | ||
String state | ||
) { | ||
} |
12 changes: 6 additions & 6 deletions
12
...ain/java/org/kkumulkkum/server/api/participant/dto/response/AvailableParticipantsDto.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
19 changes: 19 additions & 0 deletions
19
src/main/java/org/kkumulkkum/server/common/config/QuerydslConfig.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,19 @@ | ||
package org.kkumulkkum.server.common.config; | ||
|
||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import jakarta.persistence.EntityManager; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@RequiredArgsConstructor | ||
public class QuerydslConfig { | ||
|
||
private final EntityManager entityManager; | ||
|
||
@Bean | ||
public JPAQueryFactory jpaQueryFactory() { | ||
return new JPAQueryFactory(entityManager); | ||
} | ||
} |
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.