Commit afed589e0abc3269c3143b251ffafe499bc58001
1 parent
13506b93
2022年10月20日10:44:57
Showing
1 changed file
with
4 additions
and
4 deletions
fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java
@@ -144,7 +144,7 @@ public class TodoTask { | @@ -144,7 +144,7 @@ public class TodoTask { | ||
144 | final long timeSub = System.currentTimeMillis() - item.getEndTime().getTime(); | 144 | final long timeSub = System.currentTimeMillis() - item.getEndTime().getTime(); |
145 | return 24 * 3600 * 1000 < timeSub && timeSub < 2 * 24 * 3600 * 1000; | 145 | return 24 * 3600 * 1000 < timeSub && timeSub < 2 * 24 * 3600 * 1000; |
146 | }) | 146 | }) |
147 | - .collect(Collectors.toList());// 找到需要审计的主题 | 147 | + .collect(Collectors.toList());// 找到(理论上)需要审计的主题 |
148 | if (CollectionUtils.isEmpty(themeList)) | 148 | if (CollectionUtils.isEmpty(themeList)) |
149 | return; | 149 | return; |
150 | final List<LivePool> bestLives = livePoolService.lambdaQuery() | 150 | final List<LivePool> bestLives = livePoolService.lambdaQuery() |
@@ -156,7 +156,7 @@ public class TodoTask { | @@ -156,7 +156,7 @@ public class TodoTask { | ||
156 | .list();// 找到主题对应的所有人的最佳直播 | 156 | .list();// 找到主题对应的所有人的最佳直播 |
157 | final List<Long> waitCheckThemeIds = bestLives.stream() | 157 | final List<Long> waitCheckThemeIds = bestLives.stream() |
158 | .map(LivePool::getThemeId).distinct() | 158 | .map(LivePool::getThemeId).distinct() |
159 | - .collect(Collectors.toList());// 找到需要审核的主题id集合 | 159 | + .collect(Collectors.toList());// 根据最佳直播分布, 找到(真正)需要审核的主题id集合 |
160 | if (CollectionUtils.isEmpty(waitCheckThemeIds)) | 160 | if (CollectionUtils.isEmpty(waitCheckThemeIds)) |
161 | return; | 161 | return; |
162 | final List<Long> usersInShopIds = accountService.lambdaQuery() | 162 | final List<Long> usersInShopIds = accountService.lambdaQuery() |
@@ -170,7 +170,7 @@ public class TodoTask { | @@ -170,7 +170,7 @@ public class TodoTask { | ||
170 | .distinct()// 祛除重复门店 | 170 | .distinct()// 祛除重复门店 |
171 | .collect(Collectors.toList());// 最佳直播的账户分布在对应的门店id集合 | 171 | .collect(Collectors.toList());// 最佳直播的账户分布在对应的门店id集合 |
172 | final List<ActivityThemeVo> themeVos = themeList.stream() | 172 | final List<ActivityThemeVo> themeVos = themeList.stream() |
173 | - .filter(item -> waitCheckThemeIds.contains(item.getId())) | 173 | + .filter(item -> waitCheckThemeIds.contains(item.getId()))// 过滤出(真正)需要审核的主题 |
174 | .map(ActivityTheme::toVO) | 174 | .map(ActivityTheme::toVO) |
175 | .collect(Collectors.toList());// 将主题转换成vo | 175 | .collect(Collectors.toList());// 将主题转换成vo |
176 | if (CollectionUtils.isEmpty(themeVos)) | 176 | if (CollectionUtils.isEmpty(themeVos)) |
@@ -187,7 +187,7 @@ public class TodoTask { | @@ -187,7 +187,7 @@ public class TodoTask { | ||
187 | .map(item -> {// 遍历每个门店 | 187 | .map(item -> {// 遍历每个门店 |
188 | TodoHistory todo = new TodoHistory(); | 188 | TodoHistory todo = new TodoHistory(); |
189 | List<UserInfoDTO> users = userRoleRpcService.getUsers(item, Constants.ZBSJ_ROLE_CODE);// 获取门店拥有'直播审计'角色的人 | 189 | List<UserInfoDTO> users = userRoleRpcService.getUsers(item, Constants.ZBSJ_ROLE_CODE);// 获取门店拥有'直播审计'角色的人 |
190 | - if (users.size() > 0) { | 190 | + if (!users.isEmpty()) { |
191 | todo.setSend(false); | 191 | todo.setSend(false); |
192 | todo.setDone(false); | 192 | todo.setDone(false); |
193 | todo.setTodoDone(false); | 193 | todo.setTodoDone(false); |