From 549f1ced657e7a9d8c092570487240afa8bbd1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9D=80=EC=B1=84?= Date: Wed, 3 Jul 2024 01:36:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=B0=EC=97=85=20=EC=A0=84=EC=B2=B4?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20-=20=EC=A1=B0=EC=9D=B8X?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/CompanyUserRepositoryImpl.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/team9502/sinchulgwinong/domain/companyUser/repository/CompanyUserRepositoryImpl.java b/src/main/java/team9502/sinchulgwinong/domain/companyUser/repository/CompanyUserRepositoryImpl.java index 6fc4998..69d6c7b 100644 --- a/src/main/java/team9502/sinchulgwinong/domain/companyUser/repository/CompanyUserRepositoryImpl.java +++ b/src/main/java/team9502/sinchulgwinong/domain/companyUser/repository/CompanyUserRepositoryImpl.java @@ -11,7 +11,6 @@ import org.springframework.stereotype.Repository; import team9502.sinchulgwinong.domain.companyUser.entity.CompanyUser; import team9502.sinchulgwinong.domain.companyUser.entity.QCompanyUser; -import team9502.sinchulgwinong.domain.jobBoard.entity.QJobBoard; import team9502.sinchulgwinong.domain.scrap.entity.QCpUserScrap; import java.util.List; @@ -30,14 +29,10 @@ public CompanyUserRepositoryImpl(EntityManager entityManager) { @Override public Page findAllWithFilters(String sort, Float minRating, Float maxRating, Pageable pageable) { QCompanyUser companyUser = QCompanyUser.companyUser; - QCpUserScrap cpUserScrap = QCpUserScrap.cpUserScrap; - QJobBoard jobBoard = QJobBoard.jobBoard; // 기본 쿼리 구성 JPAQuery query = queryFactory - .selectFrom(companyUser) - .leftJoin(cpUserScrap).on(cpUserScrap.companyUser.eq(companyUser)) - .leftJoin(jobBoard).on(jobBoard.companyUser.eq(companyUser)); + .selectFrom(companyUser); // 필터 조건 적용 if (minRating != null && maxRating != null) { @@ -50,15 +45,9 @@ public Page findAllWithFilters(String sort, Float minRating, Float case "reviewsDesc": query.orderBy(companyUser.reviewCount.desc()); break; - case "jobPostingsDesc": - query.orderBy(jobBoard.count().desc()); - break; case "viewsDesc": query.orderBy(companyUser.viewCount.desc()); break; - case "scrapsDesc": - query.orderBy(cpUserScrap.count().desc()); - break; case "createdAtDesc": query.orderBy(companyUser.createdAt.desc()); break;