From a55290e8a93aaf6280b406136c62e8e19aefa3cd Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Wed, 20 Nov 2024 10:26:50 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20::=20(858)=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=EC=84=9C=20=ED=8E=98=EC=9D=B4=EC=A7=95=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobis/domain/application/dto/ApplicationFilter.java | 7 ------- .../usecase/TeacherQueryApplicationsUseCase.java | 6 +----- .../persistence/ApplicationPersistenceAdapter.java | 4 ---- .../application/presentation/ApplicationWebAdapter.java | 5 ++--- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/application/dto/ApplicationFilter.java b/jobis-application/src/main/java/team/retum/jobis/domain/application/dto/ApplicationFilter.java index 75aba98fe..2bc2d7876 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/application/dto/ApplicationFilter.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/application/dto/ApplicationFilter.java @@ -16,11 +16,4 @@ public class ApplicationFilter { private final String studentName; private final Boolean winterIntern; private final Year year; - private final Long page; - @Builder.Default - private int limit = 10; - - public Long getOffset() { - return (page - 1) * limit; - } } diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/TeacherQueryApplicationsUseCase.java b/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/TeacherQueryApplicationsUseCase.java index efd723e24..f3e8c28d6 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/TeacherQueryApplicationsUseCase.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/TeacherQueryApplicationsUseCase.java @@ -25,8 +25,7 @@ public TeacherQueryApplicationsResponse execute( String studentName, Long recruitmentId, Boolean winterIntern, - Year year, - Long page + Year year ) { ApplicationFilter applicationFilter = ApplicationFilter.builder() .recruitmentId(recruitmentId) @@ -34,7 +33,6 @@ public TeacherQueryApplicationsResponse execute( .studentName(studentName) .winterIntern(winterIntern) .year(year) - .page(page) .build(); List applicationVOs = queryApplicationPort.getAllByConditions(applicationFilter); @@ -56,8 +54,6 @@ public ApplicationCountResponse countApplications( .studentName(studentName) .winterIntern(winterIntern) .year(year) - .page(1L) - .limit(1000) .build(); List applicationVOs = queryApplicationPort.getAllByConditions(applicationFilter); 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 6b2d030e5..90c7a3b69 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 @@ -69,10 +69,6 @@ public List getAllByConditions(ApplicationFilter filter) { applicationEntity.createdAt.desc() ); - if (filter.getPage() != null) { - query.offset(filter.getOffset()) - .limit(filter.getLimit()); - } return query .transform( groupBy(applicationEntity.id) 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 c47c5c6cd..a2dd03ebb 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 @@ -120,10 +120,9 @@ public TeacherQueryApplicationsResponse queryTeacherApplicationList( @RequestParam(value = "student_name", required = false) String studentName, @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", required = false, defaultValue = "1") @Positive Long page + @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy") Year year ) { - return queryApplicationListService.execute(applicationStatus, studentName, recruitmentId, winterIntern, year, page); + return queryApplicationListService.execute(applicationStatus, studentName, recruitmentId, winterIntern, year); } @Cacheable