Sfoglia il codice sorgente

通话记录筛选条件-获取人工客服接口列表调整

王苗苗 2 mesi fa
parent
commit
d1e1123158

+ 3 - 0
slibra-system/src/main/java/com/slibra/business/res/UserTypeResp.java

@@ -30,5 +30,8 @@ public class UserTypeResp implements Serializable {
     //通话记录的分类 服务类型(0人工坐席 1机器人坐席 2机器人转人工)
     private Long serviceCategory;
 
+    //2025年01月08日14:05:53 从新的记录表获取 ,新增字段: 客服类型(0人工 1机器人)
+    private Integer type;
+
 
 }

+ 18 - 1
slibra-system/src/main/java/com/slibra/business/service/impl/TCallRecordServiceImpl.java

@@ -219,7 +219,7 @@ public class TCallRecordServiceImpl implements ITCallRecordService
 
     @Override
     public List<UserTypeResp> getAgentList() {
-        List<UserTypeResp> agentList = this.tCallRecordMapper.getAgentList();
+        /*List<UserTypeResp> agentList = this.tCallRecordMapper.getAgentList();
         if(!CollectionUtils.isEmpty(agentList)){
             for (UserTypeResp userTypeResp : agentList) {
                 Long serviceCategory = userTypeResp.getServiceCategory();
@@ -233,6 +233,23 @@ public class TCallRecordServiceImpl implements ITCallRecordService
                 }
             }
         }
+        return agentList;*/
+        //2025年01月08日14:00:15  因为人工坐席已经全部记录下来了,无需从通话记录再获取
+        List<UserTypeResp> agentList = this.tCallRecordMapper.getAgentList();
+        //人工姓名再外处理下,防止有其他修改昵称的地方而没有处理
+        if(!CollectionUtils.isEmpty(agentList)){
+            for (UserTypeResp userTypeResp : agentList) {
+                Integer type = userTypeResp.getType();
+                if(!Objects.isNull(type) && 0 == type){//人工 需要特殊处理
+                    Long id = userTypeResp.getId();
+                    if(!Objects.isNull(id)){
+                        SysUser sysUser = this.sysUserMapper.selectUserById(id);
+                        if(!Objects.isNull(sysUser))
+                            userTypeResp.setName(sysUser.getNickName());
+                    }
+                }
+            }
+        }
         return agentList;
     }
 

+ 10 - 2
slibra-system/src/main/resources/mapper/business/TCallRecordMapper.xml

@@ -191,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM
             t_call_record
         WHERE user_id is not null -->
-        SELECT DISTINCT
+        <!-- SELECT DISTINCT
         user_id id,
         user_name `name`,
         CASE
@@ -202,7 +202,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM
         t_call_record
         WHERE
-        user_id IS NOT NULL
+        user_id IS NOT NULL -->
+        SELECT
+        user_id id,
+        user_name `name`,
+        type
+        FROM
+        t_zuoxi_record
+        WHERE
+        del_flag = 0
     </select>
 
     <select id="getCallCountsByPhone" resultType="int">