diff --git a/src/main/java/shop/kkeujeok/kkeujeokbackend/dashboard/domain/repository/DashboardCustomRepositoryImpl.java b/src/main/java/shop/kkeujeok/kkeujeokbackend/dashboard/domain/repository/DashboardCustomRepositoryImpl.java index 64c6e54..3c72b96 100644 --- a/src/main/java/shop/kkeujeok/kkeujeokbackend/dashboard/domain/repository/DashboardCustomRepositoryImpl.java +++ b/src/main/java/shop/kkeujeok/kkeujeokbackend/dashboard/domain/repository/DashboardCustomRepositoryImpl.java @@ -92,8 +92,17 @@ public Page findForTeamDashboard(Member member, Pageable pageable List dashboards = queryFactory .selectFrom(teamDashboard) - .where(teamDashboard._super.member.eq(member) - .and(teamDashboard._super.status.eq(Status.ACTIVE))) + .where( + teamDashboard._super.member.eq(member) + .or( + teamDashboard.id.in( + JPAExpressions.select(teamDashboardMemberMapping.teamDashboard.id) + .from(teamDashboardMemberMapping) + .where(teamDashboardMemberMapping.member.id.eq(member.getId())) + ) + ) + .and(teamDashboard._super.status.eq(Status.ACTIVE)) + ) .offset(pageable.getOffset()) .limit(pageable.getPageSize()) .fetch();