<?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="bus.mapper.BNoticeInfoMapper">

 <select id="list" parameterType="bus.model.dto.page.BNoticeInfoPageDto" resultType="bus.model.dto.BNoticeInfoDto">
   select
   id,
   title,
   content,
   type,
   pub_time,
   status
   from
   b_notice_info
  <where>
    is_delete = 0
    <if test="title != null and title != ''">
      and title like concat('%',#{title},'%')
    </if>
    <if test="type != null and type != ''">
      and type = #{type}
    </if>
    <if test="status != null and status != ''">
      and status = #{status}
    </if>
    <if test="pubBeginTime != null ">
      and pub_time &gt;= #{pubBeginTime}
    </if>
    <if test="pubEndTime != null">
      and pub_time &lt;= #{pubEndTime}
    </if>
  </where>
   order by pub_time desc

 </select>

</mapper>
