From 38886c2c75c087afbbca642d78e34043c6d3ad8f Mon Sep 17 00:00:00 2001 From: Bob Sin Date: Wed, 21 Feb 2024 22:02:14 +0900 Subject: [PATCH] =?UTF-8?q?[FO-932]=20(=EB=AA=A8=EC=A7=91)=20=EB=A7=88?= =?UTF-8?q?=EA=B0=90=EC=9E=84=EB=B0=95=EC=88=9C=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95=20(#413)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infrastructure/JobOpeningRepositoryImpl.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/kotlin/com/fone/jobOpening/infrastructure/JobOpeningRepositoryImpl.kt b/server/src/main/kotlin/com/fone/jobOpening/infrastructure/JobOpeningRepositoryImpl.kt index 9ae7972b..d6c8cfa5 100644 --- a/server/src/main/kotlin/com/fone/jobOpening/infrastructure/JobOpeningRepositoryImpl.kt +++ b/server/src/main/kotlin/com/fone/jobOpening/infrastructure/JobOpeningRepositoryImpl.kt @@ -268,7 +268,7 @@ class JobOpeningRepositoryImpl( } private fun SpringDataReactiveCriteriaQueryDsl.orderSpec(sort: Sort): List { - val deadlineIsNull = + val recruitmentEndDateIsNull = case( `when`(column(JobOpening::recruitmentEndDate).isNull()).then( literal(1) @@ -276,7 +276,7 @@ class JobOpeningRepositoryImpl( `else` = literal(0) ).asc() - val deadlineAfterToday = + val recruitmentEndDateAfterToday = case( `when`(column(JobOpening::recruitmentEndDate).greaterThan(LocalDate.now())).then( literal(1) @@ -284,7 +284,7 @@ class JobOpeningRepositoryImpl( `else` = literal(0) ).desc() - val deadlineDesc = column(JobOpening::recruitmentEndDate).asc() + val recruitmentEndDateDesc = column(JobOpening::recruitmentEndDate).asc() val res = sort.map { @@ -303,8 +303,8 @@ class JobOpeningRepositoryImpl( } }.toList() - return if (sort.map { it.property }.contains("deadline")) { - listOf(deadlineIsNull, deadlineAfterToday, deadlineDesc) + return if (sort.map { it.property }.contains("recruitmentEndDate")) { + listOf(recruitmentEndDateIsNull, recruitmentEndDateAfterToday, recruitmentEndDateDesc) } else { res }