From 3dc69c0ccc688915036f531301bab0edc6ed5da1 Mon Sep 17 00:00:00 2001 From: JuyeonLee <104489022+Juye0nLee@users.noreply.github.com> Date: Sun, 24 Nov 2024 03:11:21 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=EC=8B=A0=EC=B2=AD=20=EC=84=B8?= =?UTF-8?q?=EB=B6=80=20=EC=A1=B0=ED=9A=8C=20=EB=A1=9C=EC=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) * ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#38) * ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36) * โœจ ์‹ ์ฒญ API applyId ๋ฐ˜ํ™˜ * ๐Ÿ› ์‹ ์ฒญ ์กฐํšŒ ๋กœ์ง ์ˆ˜์ • (#41) * ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36) * ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#39) * ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) * ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#38) * ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36) * โœจ ์‹ ์ฒญ API applyId ๋ฐ˜ํ™˜ * ๐Ÿ› ์‹ ์ฒญ ์„ธ๋ถ€ ์กฐํšŒ ์˜ค๋ฅ˜ ์ˆ˜์ • * ๐Ÿš€ Cd ํŒŒ์ดํ”„๋ผ์ธ ์ˆ˜์ • --- .github/workflows/CICD.yml | 10 +++------- .../ivory/repository/AbsenceCertificateRepository.java | 2 +- .../ivory/repository/MedicalCertificateRepository.java | 2 +- .../java/com/ivory/ivory/service/ApplyService.java | 4 ++-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index e966948..320bef0 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -51,19 +51,15 @@ jobs: steps: # 1. ๊ธฐ์กด์˜ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ค‘์ง€์‹œํ‚ต๋‹ˆ๋‹ค - name: Stop existing containers - run: sudo docker stop $(sudo docker ps -q) 2>/dev/null || true + run: sudo docker stop ${{ secrets.DOCKERHUB_USERNAME }}/ivory-backend # 2. ๊ธฐ์กด์˜ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค - name: Remove existing containers - run: sudo docker rm $(sudo docker ps -a -q) 2>/dev/null || true + run: sudo docker rm ${{ secrets.DOCKERHUB_USERNAME }}/ivory-backend # 3. ๊ธฐ์กด์˜ ์ด๋ฏธ์ง€๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค - name: Remove existing images - run: sudo docker rmi $(sudo docker images -q) 2>/dev/null || true - - # 4. ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ณผ๋ฅจ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค - - name: Remove unused volumes - run: sudo docker volume prune -f + run: sudo docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/ivory-backend # 5. Git ์ตœ์‹  ์ƒํƒœ๋กœ ์—…๋ฐ์ดํŠธ (git pull) - name: Pull latest changes diff --git a/src/main/java/com/ivory/ivory/repository/AbsenceCertificateRepository.java b/src/main/java/com/ivory/ivory/repository/AbsenceCertificateRepository.java index e537213..650dddb 100644 --- a/src/main/java/com/ivory/ivory/repository/AbsenceCertificateRepository.java +++ b/src/main/java/com/ivory/ivory/repository/AbsenceCertificateRepository.java @@ -11,5 +11,5 @@ @Repository public interface AbsenceCertificateRepository extends JpaRepository { Page findAllByChildId(Long childId, Pageable pageable); - Optional findByChild_Id(Long childId); + Optional findById(Long childId); } diff --git a/src/main/java/com/ivory/ivory/repository/MedicalCertificateRepository.java b/src/main/java/com/ivory/ivory/repository/MedicalCertificateRepository.java index 71ef826..df5cd51 100644 --- a/src/main/java/com/ivory/ivory/repository/MedicalCertificateRepository.java +++ b/src/main/java/com/ivory/ivory/repository/MedicalCertificateRepository.java @@ -11,5 +11,5 @@ @Repository public interface MedicalCertificateRepository extends JpaRepository { Page findAllByChildId(Long childId, Pageable pageable); - Optional findByChild_Id(Long childId); + Optional findById(Long id); } diff --git a/src/main/java/com/ivory/ivory/service/ApplyService.java b/src/main/java/com/ivory/ivory/service/ApplyService.java index de0c512..6e2e2ce 100644 --- a/src/main/java/com/ivory/ivory/service/ApplyService.java +++ b/src/main/java/com/ivory/ivory/service/ApplyService.java @@ -166,8 +166,8 @@ public CustomApiResponse getApplyDetail(Long applyId, Long currentMemberId) { } Optional child = childRepository.findById(apply.get().getChild().getId()); - Optional medicalCertificate = medicalCertificateRepository.findByChild_Id(child.get().getId()); - Optional absenceCertificate = absenceCertificateRepository.findByChild_Id(child.get().getId()); + Optional medicalCertificate = medicalCertificateRepository.findById(apply.get().getMedicalCertificate().getId()); + Optional absenceCertificate = absenceCertificateRepository.findById(apply.get().getAbsenceCertificate().getId()); //์‹ ์ฒญ ๋‚ ์งœ String applyDate = getApplyDate(apply.get().getCreateAt());