|
|
@@ -1044,13 +1044,21 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
@Override
|
|
|
public void syncNfAccountState() {
|
|
|
- List<Account> accounts = accountMapper.selectNetflixAccountLimit(5);
|
|
|
+// List<Account> accounts = accountMapper.selectNetflixAccountLimit(5);
|
|
|
+ List<Account> accounts = accountMapper.selectYinhelxComAccount();
|
|
|
if (CollUtil.isEmpty(accounts)) {
|
|
|
throw BusinessRuntimeException.getInstance("已同步完成");
|
|
|
}
|
|
|
accounts.forEach(account -> {
|
|
|
try {
|
|
|
String taskId = groupsRelationNetflixService.createNetflixAccountStatusTask(account);
|
|
|
+ AccountNetflixState exist = accountNetflixStateMapper.selectOne(Wrappers.lambdaQuery(AccountNetflixState.class)
|
|
|
+ .eq(AccountNetflixState::getAccount, account.getAccount())
|
|
|
+ .lt(AccountNetflixState::getCreatedTime, DateUtil.parse("2024-11-11 17:52:00"))
|
|
|
+ .last("limit 1"));
|
|
|
+ if (exist != null) {
|
|
|
+ accountNetflixStateMapper.deleteById(exist.getId());
|
|
|
+ }
|
|
|
log.info("任务taskId:{}", taskId);
|
|
|
AccountNetflixState accountNetflixState = new AccountNetflixState();
|
|
|
accountNetflixState.setAccount(account.getAccount());
|