package com.yihu.wlyy.repository.demographic;

import com.yihu.wlyy.entity.demographic.ResidenceInfo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * 户口信息DAO。
 */
public interface ResidenceInfoDao extends PagingAndSortingRepository<ResidenceInfo, Long>, JpaSpecificationExecutor<ResidenceInfo> {
    @Query(" FROM ResidenceInfo a WHERE a.personid=?1 ")
    List<ResidenceInfo> findByPersonId(Integer personid);

    @Query(" FROM ResidenceInfo a WHERE a.familystateid=?1 ")
    List<ResidenceInfo> findByFamilyId(Integer familyinfoid);
}
