From 29e38d35e301b1ba2db80a188451727cee08d076 Mon Sep 17 00:00:00 2001 From: wjt Date: Wed, 7 Jun 2023 15:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=82=E6=96=AD=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telemarkting/api/TelephoneCallController.java | 1 + .../telemarkting/entity/dto/TelephoneCallStopDTO.java | 1 + .../modules/telemarkting/httpRequest/CtiCallReq.java | 11 ++++------- .../service/impl/TelephoneCallServiceImpl.java | 1 + .../com/baiye/module/service/ReportTokerService.java | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/api/TelephoneCallController.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/api/TelephoneCallController.java index 43c36688..47fd33d1 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/api/TelephoneCallController.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/api/TelephoneCallController.java @@ -176,6 +176,7 @@ public class TelephoneCallController { @PostMapping("/cti/stop") @ApiOperation("cti挂断呼叫") + @Log("请求挂断") public CommonResponse ctiCallStop(@RequestBody TelephoneCallStopDTO telephoneCallStopDTO) { return telephoneCallService.ctiCallStop(telephoneCallStopDTO); } diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/entity/dto/TelephoneCallStopDTO.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/entity/dto/TelephoneCallStopDTO.java index ffec65b2..946c428c 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/entity/dto/TelephoneCallStopDTO.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/entity/dto/TelephoneCallStopDTO.java @@ -11,4 +11,5 @@ public class TelephoneCallStopDTO { private String content; private String callId; private String sessionid; + private String caller; } diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/httpRequest/CtiCallReq.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/httpRequest/CtiCallReq.java index 09ed9dd8..c162b6ad 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/httpRequest/CtiCallReq.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/httpRequest/CtiCallReq.java @@ -54,15 +54,12 @@ public class CtiCallReq { public Boolean stopReq(TelephoneCallStopDTO telephoneCallStopDTO) { JSONObject json = new JSONObject(); json.putOpt("reqId", telephoneCallStopDTO.getCallId()); - json.putOpt("callId", telephoneCallStopDTO.getSessionid()); + json.putOpt("caller", telephoneCallStopDTO.getCaller()); json.putOpt("orgCode", orgCode); json.putOpt("action", "1001"); - HttpResponse httpResponse = HttpRequest.post(reqUrl).body(JSONUtil.toJsonPrettyStr(json)).execute(); - log.info("请求挂断,session={},{}", telephoneCallStopDTO.getSessionid(), httpResponse.body()); - if (httpResponse.isOk()) { - return Boolean.TRUE; - } - return Boolean.FALSE; + String httpResponse = sendCallReq(JSONUtil.toJsonPrettyStr(json), reqUrl).body(); + CtiCallResponse ctiCallResponse = JSONUtil.toBean(httpResponse, CtiCallResponse.class); + return ctiCallResponse.getResult(); } public Boolean setReq(String callBackUrl, String notifyUrl) { 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 49bdf4ca..2436eaaa 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 @@ -380,6 +380,7 @@ public class TelephoneCallServiceImpl implements TelephoneCallService { telephoneCallStopDTO.setSessionid(requestId); telephoneCallStopDTO.setContent(content); telephoneCallStopDTO.setCallId(requestId); + telephoneCallStopDTO.setCaller(telephoneCallReqDTO.getTelA()); return CommonResponse.createBySuccess(telephoneCallStopDTO); } diff --git a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/ReportTokerService.java b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/ReportTokerService.java index bf5e7852..2ae9b3e1 100644 --- a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/ReportTokerService.java +++ b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/ReportTokerService.java @@ -3,7 +3,6 @@ package com.baiye.module.service; import com.baiye.http.CommonResponse; import com.baiye.model.dto.HomePageReportDTO; import com.baiye.model.dto.ReportStageAndTurnoverDto; -import com.baiye.module.entity.ReportTokerCall; import com.baiye.module.entity.dto.ReportTokerDTO; import javax.servlet.http.HttpServletResponse;