cloudroam
3 天以前 3a819e4f668c15e8b77b188b322470da12bb7a43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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.SmsTemplateMapper">
 
 
    <select id="queryPage" resultType="com.mzl.flower.entity.SmsTemplateDO">
        select t.* from t_sms_template t
        where t.deleted= 0
        <if test="dto.id!=null ">
            and t.id = #{dto.id}
        </if>
        <if test="dto.code != null and dto.code != ''">
            and t.code like concat('%', #{dto.code}, '%')
        </if>
        <if test="dto.name != null and dto.name != ''">
            and t.name like concat('%', #{dto.name}, '%')
        </if>
        <if test="dto.description != null and dto.description != ''">
            and t.description like concat('%', #{dto.description}, '%')
        </if>
        <if test="dto.startDate!=null ">
            <![CDATA[
               AND t.create_time >= #{dto.startDate}
            ]]>
        </if>
        <if test="dto.endDate!=null ">
            <![CDATA[
               AND t.create_time <= #{dto.endDate}
            ]]>
        </if>
 
    </select>
 
</mapper>