|
|
@@ -0,0 +1,145 @@
|
|
|
+<?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.zd.chemical.mapper.SydSmsLogMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.zd.chemical.domain.SydSmsLog" id="SydSmsLogResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="phone" column="phone"/>
|
|
|
+ <result property="content" column="content"/>
|
|
|
+ <result property="uuid" column="uuid"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="reply" column="reply"/>
|
|
|
+ <result property="replyContent" column="reply_content"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="purpose" column="purpose"/>
|
|
|
+ <result property="lockApplyId" column="lock_apply_id"/>
|
|
|
+
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectSydSmsLogVo">
|
|
|
+ select id,
|
|
|
+ phone,
|
|
|
+ content,
|
|
|
+ uuid,
|
|
|
+ status,
|
|
|
+ reply,
|
|
|
+ reply_content,
|
|
|
+ create_time,
|
|
|
+ update_time,
|
|
|
+ purpose,
|
|
|
+ lock_apply_id
|
|
|
+ from syd_sms_log
|
|
|
+ </sql>
|
|
|
+ <sql id="selectSydSmsLogListVo">
|
|
|
+ select t.id,
|
|
|
+ t.phone,
|
|
|
+ t.content,
|
|
|
+ t.uuid,
|
|
|
+ t.status,
|
|
|
+ t.reply,
|
|
|
+ t.reply_content,
|
|
|
+ t.create_time,
|
|
|
+ t.update_time,
|
|
|
+ t.purpose,
|
|
|
+ t.lock_apply_id
|
|
|
+ from syd_sms_log as t
|
|
|
+ </sql>
|
|
|
+ <select id="selectSydSmsLogList" parameterType="com.zd.chemical.domain.SydSmsLog" resultMap="SydSmsLogResult">
|
|
|
+ <include refid="selectSydSmsLogVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="phone != null and phone != ''">and phone = #{phone}</if>
|
|
|
+ <if test="content != null and content != ''">and content = #{content}</if>
|
|
|
+ <if test="uuid != null and uuid != ''">and uuid = #{uuid}</if>
|
|
|
+ <if test="status != null ">and status = #{status}</if>
|
|
|
+ <if test="reply != null ">and reply = #{reply}</if>
|
|
|
+ <if test="replyContent != null and replyContent != ''">and reply_content = #{replyContent}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getListByIds" resultMap="SydSmsLogResult">
|
|
|
+ <include refid="selectSydSmsLogVo"/>
|
|
|
+ <where>
|
|
|
+ id in
|
|
|
+ <foreach item="id" collection="list" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSydSmsLogById" resultMap="SydSmsLogResult">
|
|
|
+ <include refid="selectSydSmsLogVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSydSmsLog" parameterType="com.zd.chemical.domain.SydSmsLog">
|
|
|
+ insert into syd_sms_log
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+
|
|
|
+ <if test="phone != null and phone != ''">phone,</if>
|
|
|
+
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+
|
|
|
+ <if test="uuid != null">uuid,</if>
|
|
|
+
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+
|
|
|
+ <if test="reply != null">reply,</if>
|
|
|
+
|
|
|
+ <if test="replyContent != null">reply_content,</if>
|
|
|
+
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+
|
|
|
+ <if test="purpose != null">purpose,</if>
|
|
|
+
|
|
|
+ <if test="lockApplyId != null">lock_apply_id,</if>
|
|
|
+
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="phone != null and phone != ''">#{phone},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
+ <if test="uuid != null">#{uuid},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="reply != null">#{reply},</if>
|
|
|
+ <if test="replyContent != null">#{replyContent},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="purpose != null">#{purpose},</if>
|
|
|
+ <if test="lockApplyId != null">#{lockApplyId},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateSydSmsLog" parameterType="com.zd.chemical.domain.SydSmsLog">
|
|
|
+ update syd_sms_log
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="phone != null and phone != ''">phone = #{phone},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
+ <if test="uuid != null">uuid = #{uuid},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="reply != null">reply = #{reply},</if>
|
|
|
+ <if test="replyContent != null">reply_content = #{replyContent},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="purpose != null">purpose = #{purpose},</if>
|
|
|
+ <if test="lockApplyId != null">lock_apply_id = #{lockApplyId}</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteSydSmsLogById">
|
|
|
+ delete
|
|
|
+ from syd_sms_log
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteSydSmsLogByIds">
|
|
|
+ delete from syd_sms_log where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|