-
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] 내 일정 카테고리별 개수 조회 4방 쿼리를 서브쿼리를 통해서 1번의 Network I/O로 변경한다 (#176
) * feat: 내 일정 카테고리별 커피챗 개수 조회 Projection Dto 정의 * feat: 내 일정 카테고리별 커피챗 개수 조회 SubQuery Fetching 쿼리 * refactor: GetCoffeeChatScheduleUseCase's getEachCategoryCounts 서브쿼리 적용 * refactor: 내 일정 카테고리별 개수 서브쿼리 메소드 추출
- Loading branch information
Showing
7 changed files
with
94 additions
and
27 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
10 changes: 10 additions & 0 deletions
10
...dy/server/coffeechat/application/usecase/query/response/CoffeeChatEachCategoryCounts.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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package com.koddy.server.coffeechat.application.usecase.query.response; | ||
|
||
import com.koddy.server.coffeechat.domain.repository.query.response.CoffeeChatCountPerCategory; | ||
|
||
public record CoffeeChatEachCategoryCounts( | ||
long waiting, | ||
long suggested, | ||
long scheduled, | ||
long passed | ||
) { | ||
public static CoffeeChatEachCategoryCounts from(final CoffeeChatCountPerCategory query) { | ||
return new CoffeeChatEachCategoryCounts( | ||
query.waiting(), | ||
query.suggested(), | ||
query.scheduled(), | ||
query.passed() | ||
); | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
.../koddy/server/coffeechat/domain/repository/query/response/CoffeeChatCountPerCategory.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,14 @@ | ||
package com.koddy.server.coffeechat.domain.repository.query.response; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
|
||
public record CoffeeChatCountPerCategory( | ||
long waiting, | ||
long suggested, | ||
long scheduled, | ||
long passed | ||
) { | ||
@QueryProjection | ||
public CoffeeChatCountPerCategory { | ||
} | ||
} |
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