修改通话时间

master
wjt 1 year ago
parent 5d03b0cc49
commit 09f3654240

@ -35,10 +35,11 @@ public interface AllCallInfoRepository extends JpaRepository<AllCallInfo, Long>,
* @param recordFlag
* @param recordFileDownloadUrl
* @param id
* @param createTime
*/
@Modifying
@Query(value = "update AllCallInfo d set d.recordFlag =?1 , d.recordFileDownloadUrl = ?2 where d.id =?3")
void updateByRecord(Integer recordFlag, String recordFileDownloadUrl, Long id);
@Query(value = "update AllCallInfo d set d.recordFlag =?1 , d.recordFileDownloadUrl = ?2 ,d.createTime=?4 where d.id =?3")
void updateByRecord(Integer recordFlag, String recordFileDownloadUrl, Long id, String createTime);
/**
*
@ -46,11 +47,10 @@ public interface AllCallInfoRepository extends JpaRepository<AllCallInfo, Long>,
* @param status
* @param duration
* @param id
* @param createTime
*/
@Modifying
@Query(value = "update AllCallInfo d set d.status =?1 , d.duration = ?2 ,d.createTime=?4 where d.id =?3")
void updateByDurationAndStatus(Integer status, Integer duration, Long id, String createTime);
@Query(value = "update AllCallInfo d set d.status =?1 , d.duration = ?2 where d.id =?3")
void updateByDurationAndStatus(Integer status, Integer duration, Long id);
/**

@ -300,7 +300,7 @@ public class TelephoneCallServiceImpl implements TelephoneCallService {
//相同说明是分机号的回调
if (sessionId.equals(otherLeg) && StrUtil.isNotBlank(rollCallBackDTO.getRecord_file_url())) {
CommonLog.infoBusinessPartyTypeNewTraceId("分机回调-点呼:" + rollCallBackDTO, BusinessPartyType.DB, traceId);
allCallInfoRepository.updateByRecord(DefaultNumberConstants.ONE_NUMBER, rollCallBackDTO.getRecord_file_url(), allCallInfo.getId());
allCallInfoRepository.updateByRecord(DefaultNumberConstants.ONE_NUMBER, rollCallBackDTO.getRecord_file_url(), allCallInfo.getId(), DateUtil.now());
} else {
CommonLog.infoBusinessPartyType("被叫回调-点呼:" + rollCallBackDTO, BusinessPartyType.DB);
UserDto user = userService.findById(allCallInfo.getMemberId());
@ -310,7 +310,7 @@ public class TelephoneCallServiceImpl implements TelephoneCallService {
if (StrUtil.isNotBlank(rollCallBackDTO.getCallee_answer_time())) {
//表示接通,更新线索状态
callClueRepository.updateByStatus(DefaultNumberConstants.TWO_NUMBER, allCallInfo.getClueId());
allCallInfoRepository.updateByDurationAndStatus(DefaultNumberConstants.TWO_NUMBER, Integer.valueOf(rollCallBackDTO.getDuration()), allCallInfo.getId(), DateUtil.now());
allCallInfoRepository.updateByDurationAndStatus(DefaultNumberConstants.TWO_NUMBER, Integer.valueOf(rollCallBackDTO.getDuration()), allCallInfo.getId());
//更新资源通话状态
CompletableFuture.runAsync(() -> updateSourceCallStatus(allCallInfo.getClueId(), DefaultNumberConstants.TWO_NUMBER, allCallInfo.getClueType(), traceId));
//实时扣除话费

Loading…
Cancel
Save