123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?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.business.slfh.manager.talkmanager.mapper.TUTalkMapper">
- <resultMap type="TUTalk" id="TUTalkResult">
- <result property="id" column="id" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="senderId" column="sender_id" />
- <result property="senderName" column="sender_name" />
- <result property="sendTime" column="send_time" />
- <result property="sendType" column="send_type" />
- <result property="context" column="context" />
- <result property="eventId" column="event_id" />
- <result property="voiceName" column="voice_name" />
- <result property="voiceTimelength" column="voice_timelength" />
- </resultMap>
- <sql id="selectTUTalkVo">
- select id, status, remark, del_flag, create_by, create_time, update_by, update_time, sender_id, sender_name, send_time, send_type, context, event_id,voice_name,voice_timelength from t_u_talk
- </sql>
- <select id="selectTUTalkList" parameterType="TUTalk" resultMap="TUTalkResult">
- <include refid="selectTUTalkVo"/>
- <where>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="senderId != null "> and sender_id = #{senderId}</if>
- <if test="senderName != null and senderName != ''"> and sender_name like concat('%', #{senderName}, '%')</if>
- <if test="sendTime != null "> and send_time = #{sendTime}</if>
- <if test="sendType != null and sendType != ''"> and send_type = #{sendType}</if>
- <if test="context != null and context != ''"> and context = #{context}</if>
- <if test="eventId != null and eventId != ''"> and event_id = #{eventId}</if>
- <if test="voiceName != null and voiceName != ''"> and voice_name = #{voiceName}</if>
- <if test="voiceTimelength != null and voiceTimelength != ''"> and voice_timelength = #{voiceTimelength}</if>
- </where>
- order by send_time asc
- </select>
- <select id="selectTUTalkById" parameterType="String" resultMap="TUTalkResult">
- <include refid="selectTUTalkVo"/>
- where id = #{id}
- </select>
- <insert id="insertTUTalk" parameterType="TUTalk">
- insert into t_u_talk
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="status != null">status,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null and delFlag != ''">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="senderId != null">sender_id,</if>
- <if test="senderName != null">sender_name,</if>
- <if test="sendTime != null">send_time,</if>
- <if test="sendType != null">send_type,</if>
- <if test="context != null">context,</if>
- <if test="eventId != null">event_id,</if>
- <if test="voiceName != null">voice_name,</if>
- <if test="voiceTimelength != null">voice_timelength,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="status != null">#{status},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="senderId != null">#{senderId},</if>
- <if test="senderName != null">#{senderName},</if>
- <if test="sendTime != null">#{sendTime},</if>
- <if test="sendType != null">#{sendType},</if>
- <if test="context != null">#{context},</if>
- <if test="eventId != null">#{eventId},</if>
- <if test="voiceName != null">#{voiceName},</if>
- <if test="voiceTimelength != null">#{voiceTimelength},</if>
- </trim>
- </insert>
- <update id="updateTUTalk" parameterType="TUTalk">
- update t_u_talk
- <trim prefix="SET" suffixOverrides=",">
- <if test="status != null">status = #{status},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="senderId != null">sender_id = #{senderId},</if>
- <if test="senderName != null">sender_name = #{senderName},</if>
- <if test="sendTime != null">send_time = #{sendTime},</if>
- <if test="sendType != null">send_type = #{sendType},</if>
- <if test="context != null">context = #{context},</if>
- <if test="eventId != null">event_id = #{eventId},</if>
- <if test="voiceName != null">voice_name = #{voiceName},</if>
- <if test="voiceTimelength != null">voice_timelength = #{voiceTimelength},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTUTalkById" parameterType="String">
- delete from t_u_talk where id = #{id}
- </delete>
- <delete id="deleteTUTalkByIds" parameterType="String">
- delete from t_u_talk where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|