From f10ca55bed9d0031d1c20777048535c8ae82b6f3 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Tue, 5 Nov 2024 20:13:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=B7=20::=20(#814)=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=EC=84=9C=20=ED=8E=98=EC=9D=B4=EC=A7=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/ApplicationPersistenceAdapter.java | 2 ++ .../application/presentation/ApplicationWebAdapter.java | 2 +- .../company/persistence/CompanyPersistenceAdapter.java | 8 ++------ .../domain/company/presentation/CompanyWebAdapter.java | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java index b06918b02..204501b11 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java @@ -63,6 +63,8 @@ public List getAllByConditions(ApplicationFilter filter) { eqWinterIntern(filter.getWinterIntern()), eqYear(filter.getYear()) ) + .offset(filter.getOffset()) + .limit(filter.getLimit()) .orderBy( applicationEntity.updatedAt.desc(), applicationEntity.createdAt.desc() diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java index c4f48544e..cd3106416 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java @@ -121,7 +121,7 @@ public TeacherQueryApplicationsResponse queryTeacherApplicationList( @RequestParam(value = "recruitment_id", required = false) Long recruitmentId, @RequestParam(value = "winter_intern", required = false) Boolean winterIntern, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy") Year year, - @RequestParam(value = "page", defaultValue = "1") @Positive Long page + @RequestParam(value = "page", required = false, defaultValue = "1") @Positive Long page ) { return queryApplicationListService.execute(applicationStatus, studentName, recruitmentId, winterIntern, year, page); } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/CompanyPersistenceAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/CompanyPersistenceAdapter.java index 32394d1db..5e27c4f90 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/CompanyPersistenceAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/CompanyPersistenceAdapter.java @@ -129,14 +129,10 @@ public List getByConditions(CompanyFilter filter) { eqRegion(filter.getRegion()), eqBusinessArea(filter.getBusinessArea()) ) + .offset(filter.getOffset()) + .limit(filter.getLimit()) .orderBy(recruitmentEntity.recruitYear.desc()); - if (filter.getPage() != null) { - query - .offset(filter.getOffset()) - .limit(filter.getLimit()); - } - return query .fetch().stream() .map(TeacherCompaniesVO.class::cast) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java index 3419431d3..6903aa222 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java @@ -163,7 +163,7 @@ public TeacherQueryCompaniesResponse queryCompanies( @RequestParam(value = "name", required = false) String companyName, @RequestParam(value = "region", required = false) String region, @RequestParam(value = "business_area", required = false) Long businessArea, - @RequestParam(value = "page", required = false) @Positive Long page + @RequestParam(value = "page", required = false ,defaultValue = "1") @Positive Long page ) { return teacherQueryCompaniesUseCase.execute(type, companyName, region, businessArea, page); }