package com.system.business.dictionary; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; //@Repository public interface DictionaryDao extends JpaRepository , JpaSpecificationExecutor{ @Query(value="from Dictionary where useflag = 1 and (typecode=?1 or typename=?2)") public Dictionary findType(String typecode, String typename); @Query(value="from Dictionary where useflag = 1 and typename = ?1 and (typecode=?2 or typename=?3)") public Dictionary findItem(String typename,String itemname, String itemcode); @Query(value="from Dictionary where useflag = 1 and itemname is null order by priority") public List findAllType(); @Query(value="from Dictionary where useflag = 1 and typecode = ?1 and itemname is not null order by priority") public List findByTypecode(String typecode); }