<?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="cn.com.ctop.kuaishou.modules.batch.mapper.KuaishouBatchCampaignPreviewMapper">

    <select id="queryListByTime" resultType="cn.com.ctop.kuaishou.modules.batch.entity.KuaishouBatchCampaignPreview">
        SELECT id, campaign_id, account_id
        FROM ctop_kuaishou_batch_campaign_preview
        WHERE is_time = 1
          AND is_success = 1
          AND time_start &gt;= date_sub(now(), interval 5 minute)
          AND time_start &lt;= now()
          AND campaign_id is not null
    </select>

</mapper>