|
@@ -13,10 +13,12 @@ import com.slibra.business.mapper.TUserInfoMapper;
|
|
|
import com.slibra.business.res.CallRecordCount;
|
|
|
import com.slibra.business.res.CallUserCountInfo;
|
|
|
import com.slibra.common.DecimalUtils;
|
|
|
+import com.slibra.common.core.domain.entity.SysUser;
|
|
|
import com.slibra.common.exception.ServiceException;
|
|
|
import com.slibra.common.utils.DateUtils;
|
|
|
import com.slibra.common.utils.SecurityUtils;
|
|
|
import com.slibra.common.utils.StringUtils;
|
|
|
+import com.slibra.system.mapper.SysUserMapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
@@ -72,6 +74,9 @@ public class TCallRecordServiceImpl implements ITCallRecordService
|
|
|
@Autowired
|
|
|
@Qualifier("qiNiuYunServiceNew")
|
|
|
QiNiuYunServiceImpl qiNiuYunService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysUserMapper sysUserMapper;
|
|
|
/**
|
|
|
* 查询通话记录
|
|
|
*
|
|
@@ -335,7 +340,9 @@ public class TCallRecordServiceImpl implements ITCallRecordService
|
|
|
@Override
|
|
|
public List<CallUserCountInfo> userCallCount() {
|
|
|
//先获取所有的人工信息 再查状态 再统计数据
|
|
|
- List<CallUserCountInfo> result = this.tCallRecordMapper.selectAllUsersByType(0);
|
|
|
+ //2025年01月07日09:50:29 逻辑调整:因为人工会改名字,机器人客服不会,所以人工只获取ID,再额外查询一次最新的名字,机器人则不需要
|
|
|
+// List<CallUserCountInfo> result = this.tCallRecordMapper.selectAllUsersByType(0);
|
|
|
+ List<CallUserCountInfo> result = this.tCallRecordMapper.selectAllPersonUserIds();
|
|
|
String date = DateUtils.getDate();
|
|
|
if(!CollectionUtils.isEmpty(result)){
|
|
|
for (CallUserCountInfo callUserCountInfo : result) {
|
|
@@ -343,6 +350,13 @@ public class TCallRecordServiceImpl implements ITCallRecordService
|
|
|
log.error("统计人工客服数据的时候,存在姓名和ID全部为空的异常数据,跳过此次统计");
|
|
|
continue;
|
|
|
}
|
|
|
+ try {
|
|
|
+ SysUser sysUser = this.sysUserMapper.selectUserById(Long.valueOf(callUserCountInfo.getUserId()));
|
|
|
+ if(!Objects.isNull(sysUser))
|
|
|
+ callUserCountInfo.setUserName(sysUser.getNickName());
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ log.error("统计人工客服信息时,获取人工信息失败,异常信息为{}", e.getMessage());
|
|
|
+ }
|
|
|
String userId = callUserCountInfo.getUserId();
|
|
|
if(StringUtils.isNotBlank(userId)){
|
|
|
callUserCountInfo.setStatus(this.parseStatus(this.tCallRecordMapper.getStatusByUserId(userId)));
|