|
@@ -0,0 +1,150 @@
|
|
|
|
+<?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.slibra.business.mapper.TCallRecordMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="TCallRecord" id="TCallRecordResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
|
+ <result property="serviceCategory" column="service_category" />
|
|
|
|
+ <result property="timeBegin" column="time_begin" />
|
|
|
|
+ <result property="timeEnd" column="time_end" />
|
|
|
|
+ <result property="times" column="times" />
|
|
|
|
+ <result property="category" column="category" />
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
+ <result property="phone" column="phone" />
|
|
|
|
+ <result property="bussinessType" column="bussiness_type" />
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
+ <result property="hasParsed" column="has_parsed" />
|
|
|
|
+ <result property="parsedVoiceContent" column="parsed_voice_content" />
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
+ <result property="revision" column="revision" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectTCallRecordVo">
|
|
|
|
+ select id, type, user_id, user_name, service_category, time_begin, time_end, times, category, status, phone, bussiness_type, remark, has_parsed, parsed_voice_content, del_flag, revision, create_by, create_time, update_by, update_time from t_call_record
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectTCallRecordList" parameterType="TCallRecord" resultMap="TCallRecordResult">
|
|
|
|
+ <include refid="selectTCallRecordVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ 1 = 1
|
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
+ <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
+ <if test="serviceCategory != null "> and service_category = #{serviceCategory}</if>
|
|
|
|
+ <if test="timeBegin != null "> and time_begin = #{timeBegin}</if>
|
|
|
|
+ <if test="timeEnd != null "> and time_end = #{timeEnd}</if>
|
|
|
|
+ <if test="times != null and times != ''"> and times = #{times}</if>
|
|
|
|
+ <if test="category != null "> and category = #{category}</if>
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
|
+ <if test="bussinessType != null and bussinessType != ''"> and bussiness_type = #{bussinessType}</if>
|
|
|
|
+ <if test="hasParsed != null "> and has_parsed = #{hasParsed}</if>
|
|
|
|
+ <if test="parsedVoiceContent != null and parsedVoiceContent != ''"> and parsed_voice_content = #{parsedVoiceContent}</if>
|
|
|
|
+ <if test="revision != null "> and revision = #{revision}</if>
|
|
|
|
+ </where>
|
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectTCallRecordById" parameterType="Long" resultMap="TCallRecordResult">
|
|
|
|
+ <include refid="selectTCallRecordVo"/>
|
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertTCallRecord" parameterType="TCallRecord" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
+ insert into t_call_record
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">type,</if>
|
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
|
+ <if test="userName != null">user_name,</if>
|
|
|
|
+ <if test="serviceCategory != null">service_category,</if>
|
|
|
|
+ <if test="timeBegin != null">time_begin,</if>
|
|
|
|
+ <if test="timeEnd != null">time_end,</if>
|
|
|
|
+ <if test="times != null">times,</if>
|
|
|
|
+ <if test="category != null">category,</if>
|
|
|
|
+ <if test="status != null">status,</if>
|
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
|
+ <if test="bussinessType != null">bussiness_type,</if>
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
+ <if test="hasParsed != null">has_parsed,</if>
|
|
|
|
+ <if test="parsedVoiceContent != null">parsed_voice_content,</if>
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
+ <if test="revision != null">revision,</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>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
|
+ <if test="userName != null">#{userName},</if>
|
|
|
|
+ <if test="serviceCategory != null">#{serviceCategory},</if>
|
|
|
|
+ <if test="timeBegin != null">#{timeBegin},</if>
|
|
|
|
+ <if test="timeEnd != null">#{timeEnd},</if>
|
|
|
|
+ <if test="times != null">#{times},</if>
|
|
|
|
+ <if test="category != null">#{category},</if>
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
|
+ <if test="bussinessType != null">#{bussinessType},</if>
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
+ <if test="hasParsed != null">#{hasParsed},</if>
|
|
|
|
+ <if test="parsedVoiceContent != null">#{parsedVoiceContent},</if>
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
+ <if test="revision != null">#{revision},</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>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateTCallRecord" parameterType="TCallRecord">
|
|
|
|
+ update t_call_record
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
|
+ <if test="userName != null">user_name = #{userName},</if>
|
|
|
|
+ <if test="serviceCategory != null">service_category = #{serviceCategory},</if>
|
|
|
|
+ <if test="timeBegin != null">time_begin = #{timeBegin},</if>
|
|
|
|
+ <if test="timeEnd != null">time_end = #{timeEnd},</if>
|
|
|
|
+ <if test="times != null">times = #{times},</if>
|
|
|
|
+ <if test="category != null">category = #{category},</if>
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
|
+ <if test="bussinessType != null">bussiness_type = #{bussinessType},</if>
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
+ <if test="hasParsed != null">has_parsed = #{hasParsed},</if>
|
|
|
|
+ <if test="parsedVoiceContent != null">parsed_voice_content = #{parsedVoiceContent},</if>
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
+ <if test="revision != null">revision = #{revision},</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>
|
|
|
|
+ </trim>
|
|
|
|
+ ,revision = revision + 1
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <delete id="deleteTCallRecordById" parameterType="Long">
|
|
|
|
+ update t_call_record set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteTCallRecordByIds" parameterType="String">
|
|
|
|
+ update t_call_record set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|