package com.cirle.scientific.dao;

import com.cirle.scientific.po.Dict;
import com.cirle.scientific.po.DictDetail;
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 DictDetailDao extends PagingAndSortingRepository<DictDetail, Long>, JpaSpecificationExecutor<DictDetail> {


    @Query(value = "select a.* from sys_dict_detail a left join sys_dict b on a.dict_id = b.dict_id where b.name = ?1 and label = ?2 ",nativeQuery = true)
    List<DictDetail> listByNameAndLabel(String name, Long id);
}
