From 6f5a1a7789c81c0f1dac24770a43e81f32e5701f Mon Sep 17 00:00:00 2001 From: Profile-exe Date: Tue, 24 Sep 2024 17:20:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]:=20=EC=A7=80=EC=9B=90=EB=B6=84?= =?UTF-8?q?=EC=95=BC=EC=88=9C=20=EC=A0=95=EB=A0=AC=20=EC=88=9C=EC=84=9C=20?= =?UTF-8?q?=ED=81=B0=20=EA=B8=B0=EC=A4=80=EB=B6=80=ED=84=B0=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기준 우선순위 1. 지원분야 `field`: 개발자 - 기획자 - 디자이너 2. 세부 분야 1순위 `field1`: WEB, GAME, APP, AI 3. 세부 분야 2순위 `field2`: WEB, GAME, APP, AI 위 순서대로 정렬되도록 수정 --- .../domains/applicant/adaptor/AnswerAdaptor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java b/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java index 930e81ad..e121cee7 100644 --- a/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java +++ b/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java @@ -100,8 +100,11 @@ private void setSortType(Query query, String sortType) { switch (sortType) { case "name" -> query.with(Sort.by(Direction.ASC, "qna.name")); case "newest" -> query.with(Sort.by(Direction.DESC, "created_date")); - case "objective" -> query.with( - Sort.by(Direction.DESC, "qna.field1")); // WEB, GAME, APP, AI + case "objective" -> query.with(Sort.by( + Sort.Order.asc("qna.field"), // 지원 분야: 개발자, 기획자, 디자이너 + Sort.Order.desc("qna.field1"), // 세부 분야 1순위: WEB, GAME, APP, AI + Sort.Order.desc("qna.field2") // 세부 분야 2순위: WEB, GAME, APP, AI + )); } } From 7b55d1e86590028c17e36a724967f27427efce02 Mon Sep 17 00:00:00 2001 From: Profile-exe Date: Tue, 24 Sep 2024 17:21:12 +0900 Subject: [PATCH 2/2] [style]: spotless --- .../domains/applicant/adaptor/AnswerAdaptor.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java b/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java index e121cee7..b9ee772a 100644 --- a/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java +++ b/server/Recruit-Domain/src/main/java/com/econovation/recruitdomain/domains/applicant/adaptor/AnswerAdaptor.java @@ -100,11 +100,12 @@ private void setSortType(Query query, String sortType) { switch (sortType) { case "name" -> query.with(Sort.by(Direction.ASC, "qna.name")); case "newest" -> query.with(Sort.by(Direction.DESC, "created_date")); - case "objective" -> query.with(Sort.by( - Sort.Order.asc("qna.field"), // 지원 분야: 개발자, 기획자, 디자이너 - Sort.Order.desc("qna.field1"), // 세부 분야 1순위: WEB, GAME, APP, AI - Sort.Order.desc("qna.field2") // 세부 분야 2순위: WEB, GAME, APP, AI - )); + case "objective" -> query.with( + Sort.by( + Sort.Order.asc("qna.field"), // 지원 분야: 개발자, 기획자, 디자이너 + Sort.Order.desc("qna.field1"), // 세부 분야 1순위: WEB, GAME, APP, AI + Sort.Order.desc("qna.field2") // 세부 분야 2순위: WEB, GAME, APP, AI + )); } }