Commit 408417e1b7b91507f66e07e5988c1b41702c1dd5

Authored by 张志伟
1 parent 2f6cb7a3

:pencil2: 优化通话池的查询

fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/enums/CallTypeEnum.java
... ... @@ -15,11 +15,11 @@ public enum CallTypeEnum implements IEnum<Integer> {
15 15 /**
16 16 * 主叫
17 17 */
18   - CALL(1, "主叫"),
  18 + CALL(0, "主叫"),
19 19 /**
20 20 * 被叫
21 21 */
22   - P_CALL(2, "被叫"),
  22 + P_CALL(1, "被叫"),
23 23 ;
24 24  
25 25 /**
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/SecretReportHistoryQuery.java
1 1 package cn.fw.valhalla.domain.query;
2 2  
  3 +import cn.fw.common.validator.EnumValue;
3 4 import cn.fw.valhalla.common.utils.DateUtil;
  5 +import cn.fw.valhalla.domain.enums.CallTypeEnum;
4 6 import lombok.Data;
5 7 import lombok.EqualsAndHashCode;
6 8 import lombok.ToString;
7 9 import org.apache.commons.lang3.StringUtils;
8 10 import org.apache.commons.lang3.math.NumberUtils;
9 11  
10   -import javax.validation.constraints.NotNull;
11 12 import java.time.Instant;
12 13 import java.time.LocalDateTime;
13 14 import java.time.ZoneId;
... ... @@ -23,10 +24,15 @@ import java.util.Date;
23 24 @Data
24 25 @ToString(callSuper = true)
25 26 public class SecretReportHistoryQuery extends PoolQuery {
26   - @NotNull(message = "跟进类型不能为空")
27 27 private Integer taskType;
28 28  
29 29 /**
  30 + * 主叫/被叫
  31 + */
  32 + @EnumValue(enumClass = CallTypeEnum.class, message = "主被叫类型不正确")
  33 + private Integer callType;
  34 +
  35 + /**
30 36 * 通话时间段(区间)
31 37 */
32 38 private String callTime;
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/PoolBizService.java
... ... @@ -199,6 +199,9 @@ public class PoolBizService {
199 199 */
200 200 public AppPage<SecretReportHistoryVO> secretReportList(SecretReportHistoryQuery query) {
201 201 BV.isNotEmpty(query.getShopIds(), () -> "人员权限范围不正确,请确认是否有管理权限");
  202 + if (Objects.isNull(query.getOrder())) {
  203 + query.setOrderString(" order by call_time asc ");
  204 + }
202 205 AppPageVO<SecretReportHistoryVO> page = AppPageVO.init(query);
203 206 long total = secretReportHistoryService.secretReportCount(query);
204 207 if (total <= 0) {
... ...