Parcourir la source

通话记录表新增sessionId 将曹永创和刘威余尚辉数据关联

王苗苗 il y a 1 semaine
Parent
commit
9f94aa5d89

+ 4 - 0
slibra-system/src/main/java/com/slibra/business/domain/TCallRecord.java

@@ -28,6 +28,10 @@ public class TCallRecord extends BaseEntity
     /** 主键 */
     private Long id;
 
+    /** sessionId */
+    @Excel(name = "sessionId")
+    private String sessionId;
+
     /** 呼入分类(0白名单 1AI服务 2传统服务) */
     @Excel(name = "呼入分类", readConverterExp = "0=白名单,1=AI服务,2=传统服务")
     private Long type;

+ 9 - 4
slibra-system/src/main/resources/mapper/business/TCallRecordMapper.xml

@@ -3,9 +3,10 @@
 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="sessionId"    column="session_id"    />
         <result property="type"    column="type"    />
         <result property="userId"    column="user_id"    />
         <result property="userName"    column="user_name"    />
@@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTCallRecordVo">
-        select id, type, user_id, user_name, service_category, time_begin, time_end, times, category, status, phone, bussiness_type, url, remark, has_parsed, parsed_voice_content, del_flag, revision, create_by, create_time, update_by, update_time from t_call_record
+        select id, session_id, type, user_id, user_name, service_category, time_begin, time_end, times, category, status, phone, bussiness_type, url, remark, has_parsed, parsed_voice_content, del_flag, revision, create_by, create_time, update_by, update_time from t_call_record
     </sql>
 
 
@@ -38,10 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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="sessionId != null">session_id,</if>
             <if test="type != null">type,</if>
             <if test="userId != null">user_id,</if>
             <if test="userName != null">user_name,</if>
@@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sessionId != null">#{sessionId},</if>
             <if test="type != null">#{type},</if>
             <if test="userId != null">#{userId},</if>
             <if test="userName != null">#{userName},</if>
@@ -92,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateTCallRecord" parameterType="TCallRecord">
         update t_call_record
         <trim prefix="SET" suffixOverrides=",">
+            <if test="sessionId != null">session_id = #{sessionId},</if>
             <if test="type != null">type = #{type},</if>
             <if test="userId != null">user_id = #{userId},</if>
             <if test="userName != null">user_name = #{userName},</if>
@@ -118,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         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}
@@ -136,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTCallRecordVo"/>
         <where>
             1 = 1
+            <if test="sessionId != null  and sessionId != ''"> and session_id = #{sessionId}</if>
             <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>