Skip to content

Commit

Permalink
๐Ÿ› ์‹ ์ฒญ ์„ธ๋ถ€ ์กฐํšŒ ๋กœ์ง ์ˆ˜์ • (#42)
Browse files Browse the repository at this point in the history
* ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35)

* ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#38)

* ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36)

* โœจ ์‹ ์ฒญ API applyId ๋ฐ˜ํ™˜

* ๐Ÿ› ์‹ ์ฒญ ์กฐํšŒ ๋กœ์ง ์ˆ˜์ •  (#41)

* ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36)

* ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#39)

* ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35)

* ๐Ÿ› ์‹ ์ฒญ api ์‘๋‹ต์œผ๋กœ applyId ๋ฐ˜ํ™˜ (#38)

* ๐Ÿ› ์‹ ์ฒญ ๋ชฉ๋ก ๋ฐ˜ํ™˜ ์‹œ ์‹ ์ฒญ ๊ธฐ๋ณธํ‚ค ๋ฐ˜ํ™˜ (#35) (#36)

* โœจ ์‹ ์ฒญ API applyId ๋ฐ˜ํ™˜

* ๐Ÿ› ์‹ ์ฒญ ์„ธ๋ถ€ ์กฐํšŒ ์˜ค๋ฅ˜ ์ˆ˜์ •

* ๐Ÿš€ Cd ํŒŒ์ดํ”„๋ผ์ธ ์ˆ˜์ •
  • Loading branch information
Juye0nLee authored Nov 23, 2024
1 parent b40c654 commit 3dc69c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
@Repository
public interface AbsenceCertificateRepository extends JpaRepository<AbsenceCertificate, Long> {
Page<AbsenceCertificate> findAllByChildId(Long childId, Pageable pageable);
Optional<AbsenceCertificate> findByChild_Id(Long childId);
Optional<AbsenceCertificate> findById(Long childId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
@Repository
public interface MedicalCertificateRepository extends JpaRepository<MedicalCertificate, Long> {
Page<MedicalCertificate> findAllByChildId(Long childId, Pageable pageable);
Optional <MedicalCertificate> findByChild_Id(Long childId);
Optional<MedicalCertificate> findById(Long id);
}
4 changes: 2 additions & 2 deletions src/main/java/com/ivory/ivory/service/ApplyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public CustomApiResponse<?> getApplyDetail(Long applyId, Long currentMemberId) {
}

Optional<Child> child = childRepository.findById(apply.get().getChild().getId());
Optional<MedicalCertificate> medicalCertificate = medicalCertificateRepository.findByChild_Id(child.get().getId());
Optional<AbsenceCertificate> absenceCertificate = absenceCertificateRepository.findByChild_Id(child.get().getId());
Optional<MedicalCertificate> medicalCertificate = medicalCertificateRepository.findById(apply.get().getMedicalCertificate().getId());
Optional<AbsenceCertificate> absenceCertificate = absenceCertificateRepository.findById(apply.get().getAbsenceCertificate().getId());

//์‹ ์ฒญ ๋‚ ์งœ
String applyDate = getApplyDate(apply.get().getCreateAt());
Expand Down

0 comments on commit 3dc69c0

Please sign in to comment.