Files
3dplan/ndplannew/src/main/java/com/system/business/dictionary/DictionaryDao.java
2025-07-21 17:30:50 +08:00

26 lines
1.0 KiB
Java

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<Dictionary,Long> ,
JpaSpecificationExecutor<Dictionary>{
@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<Dictionary> findAllType();
@Query(value="from Dictionary where useflag = 1 and typecode = ?1 and itemname is not null order by priority")
public List<Dictionary> findByTypecode(String typecode);
}