Commit 408417e1b7b91507f66e07e5988c1b41702c1dd5
1 parent
2f6cb7a3
优化通话池的查询
Showing
3 changed files
with
13 additions
and
4 deletions
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/enums/CallTypeEnum.java
@@ -15,11 +15,11 @@ public enum CallTypeEnum implements IEnum<Integer> { | @@ -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 | package cn.fw.valhalla.domain.query; | 1 | package cn.fw.valhalla.domain.query; |
2 | 2 | ||
3 | +import cn.fw.common.validator.EnumValue; | ||
3 | import cn.fw.valhalla.common.utils.DateUtil; | 4 | import cn.fw.valhalla.common.utils.DateUtil; |
5 | +import cn.fw.valhalla.domain.enums.CallTypeEnum; | ||
4 | import lombok.Data; | 6 | import lombok.Data; |
5 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
6 | import lombok.ToString; | 8 | import lombok.ToString; |
7 | import org.apache.commons.lang3.StringUtils; | 9 | import org.apache.commons.lang3.StringUtils; |
8 | import org.apache.commons.lang3.math.NumberUtils; | 10 | import org.apache.commons.lang3.math.NumberUtils; |
9 | 11 | ||
10 | -import javax.validation.constraints.NotNull; | ||
11 | import java.time.Instant; | 12 | import java.time.Instant; |
12 | import java.time.LocalDateTime; | 13 | import java.time.LocalDateTime; |
13 | import java.time.ZoneId; | 14 | import java.time.ZoneId; |
@@ -23,10 +24,15 @@ import java.util.Date; | @@ -23,10 +24,15 @@ import java.util.Date; | ||
23 | @Data | 24 | @Data |
24 | @ToString(callSuper = true) | 25 | @ToString(callSuper = true) |
25 | public class SecretReportHistoryQuery extends PoolQuery { | 26 | public class SecretReportHistoryQuery extends PoolQuery { |
26 | - @NotNull(message = "跟进类型不能为空") | ||
27 | private Integer taskType; | 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 | private String callTime; | 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,6 +199,9 @@ public class PoolBizService { | ||
199 | */ | 199 | */ |
200 | public AppPage<SecretReportHistoryVO> secretReportList(SecretReportHistoryQuery query) { | 200 | public AppPage<SecretReportHistoryVO> secretReportList(SecretReportHistoryQuery query) { |
201 | BV.isNotEmpty(query.getShopIds(), () -> "人员权限范围不正确,请确认是否有管理权限"); | 201 | BV.isNotEmpty(query.getShopIds(), () -> "人员权限范围不正确,请确认是否有管理权限"); |
202 | + if (Objects.isNull(query.getOrder())) { | ||
203 | + query.setOrderString(" order by call_time asc "); | ||
204 | + } | ||
202 | AppPageVO<SecretReportHistoryVO> page = AppPageVO.init(query); | 205 | AppPageVO<SecretReportHistoryVO> page = AppPageVO.init(query); |
203 | long total = secretReportHistoryService.secretReportCount(query); | 206 | long total = secretReportHistoryService.secretReportCount(query); |
204 | if (total <= 0) { | 207 | if (total <= 0) { |