Commit 4cc97b4dc1710ede9be689c22092991e31274244
1 parent
640513e1
2023年11月10日17:33:44 优化
Showing
1 changed file
with
5 additions
and
4 deletions
src/main/java/cn/fw/freya/task/DataCaptureTask.java
... | ... | @@ -146,10 +146,11 @@ public class DataCaptureTask { |
146 | 146 | if (!CollectionUtils.isEmpty(unDoneAccounts)) |
147 | 147 | return; |
148 | 148 | videoPoolDao.deleteAll(); |
149 | - accountService.updateBatchById(unDoneAccounts.stream() | |
150 | - .peek(item -> item.setDone(false)) | |
151 | - .collect(Collectors.toList()) | |
152 | - ); | |
149 | + accountService.lambdaUpdate() | |
150 | + .eq(Account::getCookiesStatus, true) | |
151 | + .eq(Account::getDone, true) | |
152 | + .set(Account::getDone, false) | |
153 | + .update(); | |
153 | 154 | log.info("完成执行短视频数据重抓逻辑前置准备"); |
154 | 155 | } |
155 | 156 | ... | ... |