<?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.njcn.msgpush.module.push.dal.mysql.retry.MessageRetryQueueMapper">

    <select id="selectNeedRetryMessages" resultType="com.njcn.msgpush.module.push.dal.dataobject.retry.MessageRetryQueueDO">
        SELECT *
        FROM push_message_retry_queue
        WHERE next_retry_time  <![CDATA[ <= ]]>  #{currentTime} AND deleted = 0
        ORDER BY next_retry_time ASC
            LIMIT #{limit}
    </select>


</mapper>
