From 88ec2524104257f37d4ede3f87fb41cc71bd92cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9A=B0=EB=94=94?= <38103085+EunjiShin@users.noreply.github.com> Date: Sun, 21 Jul 2024 13:41:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B5=AC=EC=97=AD=EB=82=B4=20=EB=B8=94?= =?UTF-8?q?=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20=EB=B8=94=EB=9F=AD=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=98=A4=EB=A6=84=EC=B0=A8=EC=88=9C=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC=20(#63)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spot/jpa/block/repository/BlockJpaRepository.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/jpa/src/main/java/org/depromeet/spot/jpa/block/repository/BlockJpaRepository.java b/infrastructure/jpa/src/main/java/org/depromeet/spot/jpa/block/repository/BlockJpaRepository.java index a0669bbe..5f240f94 100644 --- a/infrastructure/jpa/src/main/java/org/depromeet/spot/jpa/block/repository/BlockJpaRepository.java +++ b/infrastructure/jpa/src/main/java/org/depromeet/spot/jpa/block/repository/BlockJpaRepository.java @@ -5,11 +5,14 @@ import org.depromeet.spot.jpa.block.entity.BlockEntity; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; public interface BlockJpaRepository extends JpaRepository { Optional findByStadiumIdAndCode(Long stadiumId, String code); - List findAllBySectionId(Long sectionId); + @Query("SELECT b FROM BlockEntity b where b.sectionId = :sectionId order by b.code asc") + List findAllBySectionId(@Param("sectionId") Long sectionId); boolean existsByStadiumIdAndCode(Long stadiumId, String code); }