<?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.hzs.activity.ticket.mapper.AcTicketMapper">

    <!-- 购票活动列表 -->
    <select id="listTicket" resultType="com.hzs.common.domain.activity.ticket.AcTicket">
        select *
        from ac_ticket at
        where at.del_flag = 0
          and to_char(#{queryDate}, 'yyyy-mm-dd') >= to_char(at.dis_start_date, 'yyyy-mm-dd')
          and to_char(at.dis_end_date, 'yyyy-mm-dd') >= to_char(#{queryDate}, 'yyyy-mm-dd')
          and (at.pk_vertex is null or at.pk_vertex = '' or at.pk_vertex like '%,' || #{pkVertex} || ',%')
          and at.pk_country = #{pkCountry}
    </select>

</mapper>
