2021-01-07 11:34:56 +07:00

18 lines
689 B
Java

package com.jasamedika.medifirst2000.dao;
import java.util.Map;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.jasamedika.medifirst2000.entities.Eselon;
@Repository("EselonDao")
public interface EselonDao extends PagingAndSortingRepository<Eselon, Integer>{
@Query("select new Map(eselon.id as id, eselon.eselon as eselon) from Eselon eselon where eselon.id = :eselonId and eselon.statusEnabled is true")
public Map<String, Object> getEselonById(@Param("eselonId") Integer eselonId);
}