<?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.EduTelephoneMsgMapper">
    <select id="findNewMsg" resultType="com.yida.data.common.core.entity.telephone.EduTelephoneMsg">
        select a.*
        from edu_telephone_msg a left join edu_telephone_card b on a.card_id=b.id
        where b.card_no=#{cardNo} and a.is_read=#{isRead}
        order by a.create_date desc
        limit 1
    </select>
</mapper>
