guoshilong
2023-05-25 affff835d01de682a503eee8b71d48bf35255a50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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="cn.gistack.sm.sms.mapper.SmsRecordMapper">
 
    <!--自定义分页列表查询-->
    <select id="selectSmsRecordPage" resultType="cn.gistack.sm.sms.vo.SmsRecordVO">
        select * from sm_sms_record where 1=1 and is_deleted = 0
        <if test="smsRecord.phone!=null and smsRecord.phone!=''">
            and phone like concat(concat('%',#{smsRecord.phone}),'%')
        </if>
        <if test="smsRecord.content!=null and smsRecord.content!=''">
            and content like concat(concat('%',#{smsRecord.content}),'%')
        </if>
        <if test="smsRecord.templateId!=null and smsRecord.templateId!=''">
            and template_id like concat(concat('%',#{smsRecord.templateId}),'%')
        </if>
        order by id desc
    </select>
 
</mapper>