| <?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.mzl.flower.mapper.content.BannerMapper"> | 
|     <select id="queryPage" resultType="com.mzl.flower.dto.response.content.BannerDTO"> | 
|         select t.id,t.name,t.url,t.module,t.status,t.create_time,t.update_time from t_banner t where t.deleted= 0 | 
|         <if test="dto.name != null and dto.name != ''"> | 
|             and t.name like concat('%', #{dto.name}, '%') | 
|         </if> | 
|         <if test="dto.module != null and dto.module != ''"> | 
|             and t.module = #{dto.module} | 
|         </if> | 
|         <if test="dto.status != null and dto.status != ''"> | 
|             and t.status =  #{dto.status} | 
|         </if> | 
|         <if test="dto.createDateBegin!=null "> | 
|             <![CDATA[ | 
|                AND t.create_time >= #{dto.createDateBegin} | 
|             ]]> | 
|         </if> | 
|         <if test="dto.createDateEnd!=null "> | 
|             <![CDATA[ | 
|                AND t.create_time <= #{dto.createDateEnd} | 
|             ]]> | 
|         </if> | 
|         order by t.update_time desc | 
|     </select> | 
|     <select id="queryList" resultType="com.mzl.flower.dto.response.content.BannerDTO" | 
|             parameterType="com.mzl.flower.dto.request.content.QueryBannerDTO"> | 
|         select t.id,t.name,t.url,t.module,t.status,t.create_time,t.update_time from t_banner t where t.deleted= 0 | 
|         <if test="dto.name != null and dto.name != ''"> | 
|             and t.name like concat('%', #{dto.name}, '%') | 
|         </if> | 
|         <if test="dto.module != null and dto.module != ''"> | 
|             and t.module = #{dto.module} | 
|         </if> | 
|         <if test="dto.status != null and dto.status != ''"> | 
|             and t.status =  #{dto.status} | 
|         </if> | 
|         <if test="dto.createDateBegin!=null "> | 
|             <![CDATA[ | 
|                AND t.create_time >= #{dto.createDateBegin} | 
|             ]]> | 
|         </if> | 
|         <if test="dto.createDateEnd!=null "> | 
|             <![CDATA[ | 
|                AND t.create_time <= #{dto.createDateEnd} | 
|             ]]> | 
|         </if> | 
|         order by t.update_time desc | 
|     </select> | 
| </mapper> |