package com.yihu.jw.dict.dao;


import com.yihu.jw.entity.hospital.dict.PrivateDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface PrivateDictDao extends PagingAndSortingRepository<PrivateDictDO, String>, JpaSpecificationExecutor<PrivateDictDO> {
    @Query("from PrivateDictDO t where t.hospitalCode =?1 and t.dictCode= ?2 and t.isDel = 1")
    List<PrivateDictDO> findoneByCodeAndWechatId(String hospitalCode, String dictCode);
    @Query("from PrivateDictDO t where t.isDel = 1")
    List<PrivateDictDO> findALL();
    @Query("from PrivateDictDO t where t.dictCode= ?1 and t.isDel = 1")
    List<PrivateDictDO> findByDictCodeAndIsDel(String dictCode);
}
