<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yida.data.device.telephone.mapper.EduTelephoneFamilyMapper">
    <select id="listFamily"
            resultType="com.yida.data.common.core.entity.telephone.EduTelephoneFamily">
        select distinct b.*
        from edu_telephone_card a left join edu_telephone_family b on a.id=b.card_id
        where a.del_flag=0 and a.card_no=#{cardno} and b.id is not null
        order by b.phone
    </select>

    <select id="listFamilyPage"
            resultType="com.yida.data.common.core.entity.telephone.EduTelephoneFamily">
        select distinct b.*
        from edu_telephone_card a left join edu_telephone_family b on a.id=b.card_id
        where a.del_flag=0 and a.card_no=#{cardno}
        order by b.phone
    </select>
</mapper>
