guoshilong
2024-03-13 c8b03d3da4e29fc3fb9a42ca157738256c331a00
skjcmanager/skjcmanager-service/skjcmanager-alerts/src/main/java/cn/gistack/alerts/sms/mapper/SmsRecordMapper.xml
@@ -5,8 +5,8 @@
    <!--自定义分页列表查询-->
    <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.phone!=null and smsRecord.phone!=''">
            and phone like concat(concat('%',#{smsRecord.phone}),'%')
        <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}),'%')
@@ -14,7 +14,29 @@
        <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>