From 7a6299ffc61a6ca23d3b29018215cc186d2fbfee Mon Sep 17 00:00:00 2001 From: JeonghoPark Date: Mon, 26 Jun 2023 19:17:45 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[LAS-56]=20fix:=20=EB=AA=A8=EC=A7=91?= =?UTF-8?q?=EA=B8=80=20=EC=9E=91=EC=84=B1=20=EC=8B=9C=20=EB=AA=A8=EC=A7=91?= =?UTF-8?q?=EA=B8=80=20id=20=EB=B0=98=ED=99=98=ED=95=A0=20=EB=95=8C=20json?= =?UTF-8?q?=20=EC=BB=A8=EB=B2=84=ED=84=B0=20=EA=B4=80=EB=A0=A8=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lastone/core/dto/recruitment/RecruitmentIdDto.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/com/lastone/core/dto/recruitment/RecruitmentIdDto.java b/core/src/main/java/com/lastone/core/dto/recruitment/RecruitmentIdDto.java index 3a7e50fc..a3bd8276 100644 --- a/core/src/main/java/com/lastone/core/dto/recruitment/RecruitmentIdDto.java +++ b/core/src/main/java/com/lastone/core/dto/recruitment/RecruitmentIdDto.java @@ -1,5 +1,8 @@ package com.lastone.core.dto.recruitment; +import lombok.Getter; + +@Getter public class RecruitmentIdDto { private final Long id; From e367b3f63161df14941accff39f826985f97c757 Mon Sep 17 00:00:00 2001 From: JeonghoPark Date: Mon, 26 Jun 2023 19:25:19 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[LAS-56]=20fix:=20=EB=8B=89=EB=84=A4?= =?UTF-8?q?=EC=9E=84=20=EC=A4=91=EB=B3=B5=20=EA=B2=80=EC=A6=9D=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20nickname=20=EC=BF=BC=EB=A6=AC=ED=8C=8C=EB=9D=BC?= =?UTF-8?q?=EB=AF=B8=ED=84=B0=20=ED=95=84=EC=88=98=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lastone/apiserver/controller/MyPageController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-server/src/main/java/com/lastone/apiserver/controller/MyPageController.java b/api-server/src/main/java/com/lastone/apiserver/controller/MyPageController.java index 3b329c35..3731fd73 100644 --- a/api-server/src/main/java/com/lastone/apiserver/controller/MyPageController.java +++ b/api-server/src/main/java/com/lastone/apiserver/controller/MyPageController.java @@ -26,7 +26,7 @@ public class MyPageController { private final MyPageService myPageService; @GetMapping("/nickname-check") - public ResponseEntity isDuplicatedNickname(String nickname) { + public ResponseEntity isDuplicatedNickname(@RequestParam String nickname) { NicknameCheckDto result = myPageService.isDuplicatedNickname(nickname); return ResponseEntity.ok().body(CommonResponse.success(result, SuccessCode.VALIDATE_NICKNAME.getMessage())); } From d5df2ba55bf48aa11295005e69904f5c24b3741d Mon Sep 17 00:00:00 2001 From: JeonghoPark Date: Mon, 26 Jun 2023 20:12:02 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[LAS-56]=20fix:=20=EB=AA=A8=EC=A7=91?= =?UTF-8?q?=EA=B8=80=20=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20?= =?UTF-8?q?=EB=AA=A8=EC=A7=91=EA=B8=80=20=EC=97=86=EC=9D=84=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=98=88=EC=99=B8=20=EC=B2=98=EB=A6=AC=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiserver/service/recruitment/RecruitmentServiceImpl.java | 3 ++- .../repository/recruitment/RecruitmentRepositoryCustom.java | 3 +-- .../repository/recruitment/RecruitmentRepositoryImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-server/src/main/java/com/lastone/apiserver/service/recruitment/RecruitmentServiceImpl.java b/api-server/src/main/java/com/lastone/apiserver/service/recruitment/RecruitmentServiceImpl.java index c8e6b0e0..2de9e531 100644 --- a/api-server/src/main/java/com/lastone/apiserver/service/recruitment/RecruitmentServiceImpl.java +++ b/api-server/src/main/java/com/lastone/apiserver/service/recruitment/RecruitmentServiceImpl.java @@ -65,7 +65,8 @@ public Slice getList(RecruitmentSearchCondition searchCondit @Override public RecruitmentDetailDto getDetail(Long recruitmentId) { - RecruitmentDetailDto recruitmentDetailDto = recruitmentRepository.getDetailDto(recruitmentId).orElseThrow(RecruitmentNotFoundException::new); + Recruitment recruitment = recruitmentRepository.getDetail(recruitmentId).orElseThrow(RecruitmentNotFoundException::new); + RecruitmentDetailDto recruitmentDetailDto = RecruitmentDetailDto.toDto(recruitment); recruitmentDetailDto.setSbdDto(sbdRepository.findLatestRecordByMemberId(recruitmentDetailDto.getMemberId())); return recruitmentDetailDto; } diff --git a/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryCustom.java b/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryCustom.java index 6c0b6650..5fcddc9c 100644 --- a/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryCustom.java +++ b/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryCustom.java @@ -1,7 +1,6 @@ package com.lastone.core.repository.recruitment; import com.lastone.core.domain.recruitment.Recruitment; -import com.lastone.core.dto.recruitment.RecruitmentDetailDto; import com.lastone.core.dto.recruitment.RecruitmentListDto; import com.lastone.core.dto.recruitment.RecruitmentSearchCondition; import org.springframework.data.domain.Slice; @@ -12,7 +11,7 @@ public interface RecruitmentRepositoryCustom { Slice getListDto(RecruitmentSearchCondition searchCondition); - Optional getDetailDto(Long recruitmentId); + Optional getDetail(Long recruitmentId); List getListDtoInMainPage(); diff --git a/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryImpl.java b/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryImpl.java index 0faefd61..e97f9506 100644 --- a/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryImpl.java +++ b/core/src/main/java/com/lastone/core/repository/recruitment/RecruitmentRepositoryImpl.java @@ -35,7 +35,7 @@ public class RecruitmentRepositoryImpl implements RecruitmentRepositoryCustom{ private static final int DEFAULT_MAIN_PAGE_SIZE = 9; @Override - public Optional getDetailDto(Long recruitmentId) { + public Optional getDetail(Long recruitmentId) { Recruitment findRecruitment = queryFactory .selectFrom(recruitment) @@ -48,7 +48,7 @@ public Optional getDetailDto(Long recruitmentId) { ) .fetchOne(); - return Optional.of(RecruitmentDetailDto.toDto(findRecruitment)); + return Optional.ofNullable(findRecruitment); } @Override