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
36
37
38
39
40
41
42
| <?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.alerts.sms.mapper.SmsRecordMapper">
|
| <!--自定义分页列表查询-->
| <select id="selectSmsRecordPage" resultType="cn.gistack.alerts.sms.vo.SmsRecordVO">
| select * from sm_sms_record where 1=1 and is_deleted = 0
| <if test="smsRecord.tel!=null and smsRecord.tel!=''">
| and tel like concat(concat('%',#{smsRecord.tel}),'%')
| </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>
| <if test="smsRecord.resultId!=null">
| and result_id = #{smsRecord.resultId}
| </if>
| order by id desc
| </select>
|
| <!--批量新增-->
| <insert id="batchSaveSendRecord"
| parameterType="cn.gistack.alerts.sms.entity.SmsRecord" useGeneratedKeys="true" keyProperty="id">
| insert into sm_sms_record
| (id,template_id,tel,content,response_status,response_msg,result_id,is_deleted,create_time)
| <foreach collection="list" item="item" index="index" separator=",">
| (
| #{item.id},
| #{item.templateId},
| #{item.tel},
| #{item.content},
| #{item.responseStatus},
| #{item.responseMsg},
| #{item.resultId},
| 0,now()
| )
| </foreach>
| </insert>
|
| </mapper>
|
|