cdr list by phone bug fixes

This commit is contained in:
Donghuang 2021-10-25 14:48:37 +08:00
parent e72d4b5bc0
commit 0d93a4843a

View File

@ -101,8 +101,15 @@ public class CallDetailRecordController
else {
val startDate = form.getStartDate();
val endDate = form.getEndDate();
Assert.state(DateUtils.addDays(startDate, 14).after(endDate),
"查询时间范围不能大于14天");
val calledNumber = form.getCalledNumber();
if (StringUtils.isNotBlank(calledNumber)) {
search.eq(CALLED_NUMBER, calledNumber);
}
else {
Assert.state(DateUtils.addDays(startDate, 14).after(endDate),
"无索引条件查询(被叫号码、ConnID)时间范围不能大于14天");
}
search.gt(START_STAMP, startDate);
search.lt(START_STAMP, endDate);
@ -110,7 +117,6 @@ public class CallDetailRecordController
doSearch(search::eq, CAMPAIGN_ID, form::getCampaignId, Objects::nonNull);
doSearch(search::eq, ACCOUNT, form::getAccount, StringUtils::isNotBlank);
doSearch(search::eq, CALLER_NUMBER, form::getCallerNumber, StringUtils::isNotBlank);
doSearch(search::eq, CALLED_NUMBER, form::getCalledNumber, StringUtils::isNotBlank);
}
search.eq(DELETED, false);