package com.ann.demo.repository;

import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.EMRDictionary;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @Author: LeiJiaXin
 * @Date: 2019/9/21 16:04
 */
@Repository
public interface EMRDictionaryRepository extends JpaRepository<EMRDictionary, Integer> {

    @Query("select o from EMRDictionary o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
    public EMRDictionary findEMRDictionaryByCodeAndIsValid(String code, Integer isValid);
}
