<?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.bonus.canteen.core.notice.notice.v2.mapper.InformHistoryMapper">

    <select id="queryApplietPageList" resultType="com.bonus.canteen.core.notice.notice.v2.vo.InformHistoryAppletPageVO">
        SELECT t1.informhis_id,
               t1.inform_type,
               t1.inform_statime,
               t1.inform_content
        FROM inform_history t1
        WHERE EXISTS(SELECT NULL
                     FROM inform_range t2
                     WHERE t1.informhis_id = t2.informhis_id
                       AND t2.cust_id =
                           #{content.custId})
        ORDER BY t1.inform_statime DESC
    </select>
</mapper>
