|
@@ -187,11 +187,25 @@ public class AmsExecuteRecordServiceImpl extends SuperWhaleServiceImpl<AmsExecut
|
|
|
|
|
|
@Override
|
|
|
public void restartExecute(String executeId, String password) {
|
|
|
+
|
|
|
AmsExecuteRecord executeRecord = this.getById(executeId);
|
|
|
+ if (executeRecord.getExecuteStatus() == 1 || executeRecord.getExecuteStatus() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String groupName = executeRecord.getGroupName();
|
|
|
String userId = executeRecord.getUserId();
|
|
|
List<AmsAddressAccount> accounts = accountService.getByGroupNameAndUserId(groupName, userId);
|
|
|
- List<AirdropWallet> wallets = accountService.getAirdropAddressByAccount(accounts, userId, groupName, password);
|
|
|
+ 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<AirdropWallet> wallets = accountService.getAirdropAddressByAccount(accountNotExecList, userId, groupName, password);
|
|
|
AmsAirdropTask task = taskService.getById(executeRecord.getTaskId());
|
|
|
runTask(
|
|
|
executeRecord.getIntervalMin(),
|