|
@@ -195,16 +195,13 @@ public class AmsExecuteRecordServiceImpl extends SuperWhaleServiceImpl<AmsExecut
|
|
|
String groupName = executeRecord.getGroupName();
|
|
|
String userId = executeRecord.getUserId();
|
|
|
List<AmsAddressAccount> accounts = accountService.getByGroupNameAndUserId(groupName, userId);
|
|
|
- List<AmsAddressAccount> accountNotExecList = new ArrayList<>();
|
|
|
List<AmsTradeRecord> amsTradeRecords = tradeService.listByExecId(executeId);
|
|
|
- amsTradeRecords.forEach(amsTradeRecord -> {
|
|
|
- accounts.forEach(account -> {
|
|
|
- boolean equalsIgnoreCase = account.getAddress().equalsIgnoreCase(amsTradeRecord.getAddress());
|
|
|
- if (equalsIgnoreCase) {
|
|
|
- accountNotExecList.add(account);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ List<AmsAddressAccount> accountNotExecList = accounts.stream().filter(account -> {
|
|
|
+ boolean b = amsTradeRecords
|
|
|
+ .stream()
|
|
|
+ .anyMatch(amsTradeRecord -> amsTradeRecord.getAddress().equals(account.getAddress()));
|
|
|
+ return !b;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
List<AirdropWallet> wallets = accountService.getAirdropAddressByAccount(accountNotExecList, userId, groupName, password);
|
|
|
AmsAirdropTask task = taskService.getById(executeRecord.getTaskId());
|
|
|
runTask(
|