Commit 66420a7b3b0f7dd40bac318e34da49d8d995c9e1
1 parent
e2f42cae
2022年7月26日17:36:06 增加最佳直播标识
Showing
2 changed files
with
13 additions
and
1 deletions
fw-dalaran-domain/src/main/java/cn/fw/dalaran/domain/dto/PoolQueryDTO.java
@@ -13,6 +13,7 @@ import java.time.LocalDate; | @@ -13,6 +13,7 @@ import java.time.LocalDate; | ||
13 | import java.time.LocalDateTime; | 13 | import java.time.LocalDateTime; |
14 | import java.time.ZoneId; | 14 | import java.time.ZoneId; |
15 | import java.util.Arrays; | 15 | import java.util.Arrays; |
16 | +import java.util.Collections; | ||
16 | import java.util.List; | 17 | import java.util.List; |
17 | import java.util.Objects; | 18 | import java.util.Objects; |
18 | import java.util.stream.Collectors; | 19 | import java.util.stream.Collectors; |
@@ -78,6 +79,10 @@ public class PoolQueryDTO extends BasePageQuery { | @@ -78,6 +79,10 @@ public class PoolQueryDTO extends BasePageQuery { | ||
78 | * 日期类型 | 79 | * 日期类型 |
79 | */ | 80 | */ |
80 | private Integer dateType; | 81 | private Integer dateType; |
82 | + /** | ||
83 | + * 最佳直播 | ||
84 | + */ | ||
85 | + private Boolean bestLive; | ||
81 | 86 | ||
82 | /** | 87 | /** |
83 | * 重写valid的get方法 | 88 | * 重写valid的get方法 |
@@ -87,7 +92,7 @@ public class PoolQueryDTO extends BasePageQuery { | @@ -87,7 +92,7 @@ public class PoolQueryDTO extends BasePageQuery { | ||
87 | public List<Integer> getValid() { | 92 | public List<Integer> getValid() { |
88 | if (Objects.isNull(this.valid)) | 93 | if (Objects.isNull(this.valid)) |
89 | return null; | 94 | return null; |
90 | - return valid ? Arrays.asList(1, 11) : Arrays.asList(0, -1, -2); | 95 | + return valid ? (Objects.nonNull(this.bestLive) && bestLive ? Collections.singletonList(11) : Arrays.asList(1, 11)) : Arrays.asList(0, -1, -2); |
91 | } | 96 | } |
92 | 97 | ||
93 | /** | 98 | /** |
fw-dalaran-domain/src/main/java/cn/fw/dalaran/domain/vo/LivePoolVO.java
@@ -126,6 +126,13 @@ public class LivePoolVO { | @@ -126,6 +126,13 @@ public class LivePoolVO { | ||
126 | private String account; | 126 | private String account; |
127 | 127 | ||
128 | /** | 128 | /** |
129 | + * 是否为最佳直播 | ||
130 | + */ | ||
131 | + public boolean getBestLive() { | ||
132 | + return this.valid > 10; | ||
133 | + } | ||
134 | + | ||
135 | + /** | ||
129 | * 重写get方法 | 136 | * 重写get方法 |
130 | * | 137 | * |
131 | * @return 是否为有效直播 | 138 | * @return 是否为有效直播 |