mirror of
https://github.com/valitydev/newway.git
synced 2024-11-06 17:35:17 +00:00
Deduplication handling for wallets
This commit is contained in:
parent
031793f45b
commit
035bf50245
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>newway</artifactId>
|
||||
<version>1.0.40-SNAPSHOT</version>
|
||||
<version>1.0.41-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>newway</name>
|
||||
|
@ -47,6 +47,7 @@ public class DepositCreatedHandler extends AbstractDepositHandler {
|
||||
deposit.setDepositStatus(DepositStatus.pending);
|
||||
deposit.setExternalId(change.getCreated().getExternalId());
|
||||
|
||||
depositDao.updateNotCurrent(event.getSource());
|
||||
depositDao.save(deposit);
|
||||
log.info("Deposit have been saved, eventId={}, depositId={}", event.getId(), event.getSource());
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ public class DestinationCreatedHandler extends AbstractDestinationHandler {
|
||||
}
|
||||
}
|
||||
|
||||
destinationDao.updateNotCurrent(event.getSource());
|
||||
destinationDao.save(destination);
|
||||
log.info("Destination have been saved, eventId={}, destinationId={}", event.getId(), event.getSource());
|
||||
}
|
||||
|
@ -65,8 +65,7 @@ public class IdentityChallengeCreatedHandler extends AbstractIdentityHandler {
|
||||
challenge.setChallengeStatus(ChallengeStatus.pending);
|
||||
}
|
||||
|
||||
|
||||
|
||||
challengeDao.updateNotCurrent(event.getSource(), challengeChange.getId());
|
||||
challengeDao.save(challenge);
|
||||
log.info("Start identity challenge have been created, eventId={}, identityId={}, challengeId={}", event.getId(), event.getSource(), challengeChange.getId());
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ public class SourceCreatedHandler extends AbstractSourceHandler {
|
||||
source.setResourceInternalDetails(internal.getDetails());
|
||||
}
|
||||
|
||||
sourceDao.updateNotCurrent(event.getSource());
|
||||
sourceDao.save(source);
|
||||
log.info("Source have been saved, eventId={}, sourceId={}", event.getId(), event.getSource());
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class WalletCreatedHandler extends AbstractWalletHandler {
|
||||
wallet.setWalletName(change.getCreated().getName());
|
||||
wallet.setExternalId(change.getCreated().getExternalId());
|
||||
|
||||
walletDao.updateNotCurrent(event.getSource());
|
||||
walletDao.save(wallet);
|
||||
log.info("Wallet have been saved, eventId={}, walletId={}", event.getId(), event.getSource());
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ public class WithdrawalCreatedHandler extends AbstractWithdrawalHandler {
|
||||
withdrawal.setCurrencyCode(cash.getCurrency().getSymbolicCode());
|
||||
withdrawal.setWithdrawalStatus(WithdrawalStatus.pending);
|
||||
|
||||
withdrawalDao.updateNotCurrent(event.getSource());
|
||||
withdrawalDao.save(withdrawal);
|
||||
log.info("Withdrawal have been saved, eventId={}, walletId={}", event.getId(), event.getSource());
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ public class WithdrawalSessionCreatedHandler extends AbstractWithdrawalSessionHa
|
||||
withdrawalSession.setAmount(cash.getAmount());
|
||||
withdrawalSession.setCurrencyCode(cash.getCurrency().getSymbolicCode());
|
||||
|
||||
withdrawalSessionDao.updateNotCurrent(event.getSource());
|
||||
Long id = withdrawalSessionDao.save(withdrawalSession);
|
||||
|
||||
log.info("Withdrawal session have been saved: id={}, eventId={}, sessionId={}",
|
||||
|
Loading…
Reference in New Issue
Block a user