From 8edca3ca77f77452062e68a38e8eb7306565fd6e Mon Sep 17 00:00:00 2001 From: wujingtao Date: Mon, 6 Feb 2023 10:22:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=AE=9E=E6=97=B6=E9=80=9A?= =?UTF-8?q?=E8=AF=9D=E8=B4=B9=E7=94=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TelephoneCallServiceImpl.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 9420eb76..1dd0ddf4 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 @@ -282,6 +282,7 @@ public class TelephoneCallServiceImpl implements TelephoneCallService { telephoneCallStopDTO.setCallId(requestId); return CommonResponse.createBySuccess(telephoneCallStopDTO); } + @Override public CommonResponse rollCallStop(TelephoneCallStopDTO telephoneCallStopDTO) { if (rollCallReq.stopReq(telephoneCallStopDTO)) { @@ -289,6 +290,7 @@ public class TelephoneCallServiceImpl implements TelephoneCallService { } return CommonResponse.createByError(); } + /** * 点呼回调 会得到两个,一个是针对分机号 一个是针对真实被叫 保存信息取值被叫回调,录音取分机号回调(被叫回调没有录音) * @@ -424,16 +426,19 @@ public class TelephoneCallServiceImpl implements TelephoneCallService { * @param duration * @return */ - private Double dealDuration(int duration) { + private double dealDuration(int duration) { if (duration <= DefaultNumberConstants.SIXTY) { return 1.00; } else { + //余数 int i = duration % 60; - double div = NumberUtil.div(duration, 60); + //整数 + int q = duration / 60; + if (i > 0) { - return NumberUtil.add(div, 1); + return NumberUtil.add(q, 1); } else { - return div; + return q; } } }