<?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="org.jeecg.pm.mapper.AdvertisingScreenAnnounceMapper">
    <select id="pageList" resultType="org.jeecg.pm.entity.AdvertisingScreenAnnounceVo">
        SELECT ad.id,
               ass.`code`,
               ass.`name`,
               ass.ip,
               ass.district_name,
               ad.setting_id,
               ad.type,
               ad.title,
               ad.start_date,
               ad.end_date,
               ad.content,
               ad.create_user_id,
               ad.create_time
        FROM `advertising_screen_setting` ass LEFT JOIN advertising_screen_announce ad ON ass.id = ad.setting_id
        where ad.deleted = 0
            <if test="advertisingScreenAnnounce.startDate!=null and advertisingScreenAnnounce.endDate !=null" >
                and ad.start_date >= #{advertisingScreenAnnounce.startDate}
                and #{advertisingScreenAnnounce.endDate} >= ad.end_date
            </if>
    </select>
</mapper>