Skip to content

Commit

Permalink
feat: 구역내 블록 조회시 블럭 코드 오름차순 정렬 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
EunjiShin authored Jul 21, 2024
1 parent 0b6a973 commit 88ec252
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockEntity, Long> {
Optional<BlockEntity> findByStadiumIdAndCode(Long stadiumId, String code);

List<BlockEntity> findAllBySectionId(Long sectionId);
@Query("SELECT b FROM BlockEntity b where b.sectionId = :sectionId order by b.code asc")
List<BlockEntity> findAllBySectionId(@Param("sectionId") Long sectionId);

boolean existsByStadiumIdAndCode(Long stadiumId, String code);
}

0 comments on commit 88ec252

Please sign in to comment.