package com.its.op.dao.repository.its.road;

import com.its.op.entity.its.road.TbRoadVrtxArr;
import com.its.op.entity.its.road.TbRoadVrtxArrKey;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbRoadVrtxArrRepository extends JpaRepository<TbRoadVrtxArr, TbRoadVrtxArrKey>, JpaSpecificationExecutor<TbRoadVrtxArr> {

    @Query("select p from TbRoadVrtxArr p, TbRoad road where p.levl = :levl and road.delYn = 'N' and p.roadId = road.roadId")
    List<TbRoadVrtxArr> findAllByLevl(@Param("levl") Integer levl);

}
