cloudroam
2025-03-28 5a1450c6f418a653d0e2cd6cd950b98093db73b3
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
35
<?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.SmsTaskMapper">
 
 
    <select id="queryPage" resultType="com.mzl.flower.dto.response.sms.SmsTaskVO">
        SELECT
        t.* ,st.`name` as sms_template_name,st.description as sms_template_desc
        FROM
        t_sms_task t
        LEFT JOIN t_sms_template st ON t.sms_template_id = st.id
        where t.deleted= 0
        <if test="dto.name != null and dto.name != ''">
            and t.name like concat('%', #{dto.name}, '%')
        </if>
        <if test="dto.smsTemplateName != null and dto.smsTemplateName != ''">
            and st.name like concat('%', #{dto.smsTemplateName}, '%')
        </if>
        <if test="dto.status != null and dto.status != ''">
            and t.status =  #{dto.status}
        </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>