diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/dao/AllCallInfoRepository.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/dao/AllCallInfoRepository.java index 7a552b2a..6ce8888e 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/dao/AllCallInfoRepository.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/dao/AllCallInfoRepository.java @@ -35,10 +35,11 @@ public interface AllCallInfoRepository extends JpaRepository, * @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, * @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); /** diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java index 2b600670..bee870f1 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java @@ -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)); //实时扣除话费