From 8fa4be62ed069d61a13549b759a78405c60a3f8c Mon Sep 17 00:00:00 2001 From: SSung023 Date: Sun, 30 Mar 2025 20:00:29 +0900 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=EC=BF=BC=EB=A6=AC=EC=9D=98=20?= =?UTF-8?q?=EC=84=B1=EB=8A=A5=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/CertificationRepository.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/genius/gitget/challenge/certification/repository/CertificationRepository.java b/src/main/java/com/genius/gitget/challenge/certification/repository/CertificationRepository.java index 5329be0c..d27abbed 100644 --- a/src/main/java/com/genius/gitget/challenge/certification/repository/CertificationRepository.java +++ b/src/main/java/com/genius/gitget/challenge/certification/repository/CertificationRepository.java @@ -1,27 +1,29 @@ package com.genius.gitget.challenge.certification.repository; -import com.genius.gitget.challenge.certification.domain.CertificateStatus; -import com.genius.gitget.challenge.certification.domain.Certification; import java.time.LocalDate; import java.util.List; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; +import com.genius.gitget.challenge.certification.domain.CertificateStatus; +import com.genius.gitget.challenge.certification.domain.Certification; + public interface CertificationRepository extends JpaRepository { - @Query("select c from Certification c where c.certificatedAt = :targetDate and c.participant.id = :participantId") - Optional findByDate(@Param("targetDate") LocalDate targetDate, - @Param("participantId") Long participantId); + @Query("select c from Certification c where c.participant.id = :participantId AND c.certificatedAt = :targetDate") + Optional findByDate(@Param("targetDate") LocalDate targetDate, + @Param("participantId") Long participantId); - @Query("select c from Certification c where c.participant.id = :participantId and c.certificatedAt between :startDate AND :endDate order by c.currentAttempt desc") - List findByDuration(@Param("startDate") LocalDate startDate, - @Param("endDate") LocalDate endDate, - @Param("participantId") Long participantId); + @Query("select c from Certification c where c.participant.id = :participantId and c.certificatedAt between :startDate AND :endDate order by c.currentAttempt desc") + List findByDuration(@Param("startDate") LocalDate startDate, + @Param("endDate") LocalDate endDate, + @Param("participantId") Long participantId); - @Query("select c from Certification c where c.participant.id = :participantId and c.certificationStatus = :status and c.certificatedAt <= :currentDate") - List findByStatus(@Param("participantId") Long participantId, - @Param("status") CertificateStatus status, - @Param("currentDate") LocalDate currentDate); + @Query("select c from Certification c where c.participant.id = :participantId and c.certificatedAt <= :currentDate AND c.certificationStatus = :status") + List findByStatus(@Param("participantId") Long participantId, + @Param("status") CertificateStatus status, + @Param("currentDate") LocalDate currentDate); } From 411c777c3db815a6135d6950e94ff1a88a3a4965 Mon Sep 17 00:00:00 2001 From: SSung023 Date: Sun, 30 Mar 2025 20:08:49 +0900 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20git=20submodule=20=EA=B0=B1?= =?UTF-8?q?=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GitGet-BACK-SECRET | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitGet-BACK-SECRET b/GitGet-BACK-SECRET index d3101d08..9e058604 160000 --- a/GitGet-BACK-SECRET +++ b/GitGet-BACK-SECRET @@ -1 +1 @@ -Subproject commit d3101d0881a3ea01d7dba39a954c8aa04d9a12c3 +Subproject commit 9e0586040622894181e1e197b0b42ed6707af4c2 From 59a2ff7e246660abae92dc0d67eca6e0275e9be9 Mon Sep 17 00:00:00 2001 From: SSung023 Date: Sun, 30 Mar 2025 20:11:02 +0900 Subject: [PATCH 3/5] =?UTF-8?q?chore:=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 30 +++++++++++++----------------- .github/workflows/prTest.yml | 11 +++++------ 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46d28e4c..df1cbb43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,23 +29,19 @@ jobs: - name: make application.yml run: | - mkdir -p ./src/main/resources - cd ./src/main/resources - touch ./application.yml - touch ./application-common.yml - touch ./application-prod.yml - echo "${{ secrets.APPLICATION }}" > ./application.yml - echo "${{ secrets.COMMON }}" > ./application-common.yml - echo "${{ secrets.PROD }}" > ./application-prod.yml - - - name: make test application.yml - run: | - mkdir -p ./src/test/resources - cd ./src/test/resources - touch ./application.yml - touch ./application-test.yml - echo "${{ secrets.APPLICATION_TEST }}" > ./application.yml - echo "${{ secrets.TEST }}" > ./application-test.yml + mkdir -p src/main/resources + cp GitGet-BACK-SECRET/main/resources/application.yml src/main/resources/ + cp GitGet-BACK-SECRET/main/resources/application-prod.yml src/main/resources/ + cp GitGet-BACK-SECRET/main/resources/application-common.yml src/main/resources/ + + mkdir -p src/test/resources + cp GitGet-BACK-SECRET/test/resources/application.yml src/test/resources/ + cp HGitGet-BACK-SECRET/test/resources/application-test.yml src/test/resources/ + + echo "Main resources contents:" + ls -la src/main/resources/ + echo "Test resources contents:" + ls -la src/test/resources/ - name: Grant execute permission for gradlew run: chmod +x ./gradlew diff --git a/.github/workflows/prTest.yml b/.github/workflows/prTest.yml index 743750d3..c1f43294 100644 --- a/.github/workflows/prTest.yml +++ b/.github/workflows/prTest.yml @@ -20,14 +20,13 @@ jobs: - name: make application.yml run: | mkdir -p src/main/resources - cp HERE-WE-SECRET/main/resources/application.yml src/main/resources/ - cp HERE-WE-SECRET/main/resources/application-dev.yml src/main/resources/ - cp HERE-WE-SECRET/main/resources/application-prod.yml src/main/resources/ - cp HERE-WE-SECRET/main/resources/application-common.yml src/main/resources/ + cp GitGet-BACK-SECRET/main/resources/application.yml src/main/resources/ + cp GitGet-BACK-SECRET/main/resources/application-prod.yml src/main/resources/ + cp GitGet-BACK-SECRET/main/resources/application-common.yml src/main/resources/ mkdir -p src/test/resources - cp HERE-WE-SECRET/test/resources/application.yml src/test/resources/ - cp HERE-WE-SECRET/test/resources/application-test.yml src/test/resources/ + cp GitGet-BACK-SECRET/test/resources/application.yml src/test/resources/ + cp HGitGet-BACK-SECRET/test/resources/application-test.yml src/test/resources/ echo "Main resources contents:" ls -la src/main/resources/ From b21259fce2e541c3b359d8d4ace6150705e0cb5b Mon Sep 17 00:00:00 2001 From: SSung023 Date: Sun, 30 Mar 2025 20:13:31 +0900 Subject: [PATCH 4/5] =?UTF-8?q?chore:=20git=20submodule=20=EA=B0=B1?= =?UTF-8?q?=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GitGet-BACK-SECRET | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitGet-BACK-SECRET b/GitGet-BACK-SECRET index 9e058604..1b02d687 160000 --- a/GitGet-BACK-SECRET +++ b/GitGet-BACK-SECRET @@ -1 +1 @@ -Subproject commit 9e0586040622894181e1e197b0b42ed6707af4c2 +Subproject commit 1b02d6877d424fa6b75ed362e774c1bde48c413c From fb89b71d35ffd0644f1f6aceac5bfd2e8768247b Mon Sep 17 00:00:00 2001 From: SSung023 Date: Sun, 30 Mar 2025 20:23:56 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore:=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prTest.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/prTest.yml b/.github/workflows/prTest.yml index c1f43294..6f8cf990 100644 --- a/.github/workflows/prTest.yml +++ b/.github/workflows/prTest.yml @@ -8,14 +8,12 @@ jobs: PRTest: runs-on: ubuntu-latest permissions: write-all + steps: - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' + token: ${{ secrets.ACTIONS_TOKEN }} + submodules: true - name: make application.yml run: | @@ -23,16 +21,16 @@ jobs: cp GitGet-BACK-SECRET/main/resources/application.yml src/main/resources/ cp GitGet-BACK-SECRET/main/resources/application-prod.yml src/main/resources/ cp GitGet-BACK-SECRET/main/resources/application-common.yml src/main/resources/ - + mkdir -p src/test/resources cp GitGet-BACK-SECRET/test/resources/application.yml src/test/resources/ - cp HGitGet-BACK-SECRET/test/resources/application-test.yml src/test/resources/ - + cp GitGet-BACK-SECRET/test/resources/application-test.yml src/test/resources/ + echo "Main resources contents:" ls -la src/main/resources/ echo "Test resources contents:" ls -la src/test/resources/ - + - name: Grant execute permission for gradlew run: chmod +x ./gradlew