After review

This commit is contained in:
k.struzhkin 2021-03-31 13:34:11 +03:00
parent dca8fef0c9
commit b9943ef5ce
4 changed files with 8 additions and 8 deletions

View File

@ -15,6 +15,6 @@ public interface RecurrentPaymentToolDao extends GenericDao {
void updateNotCurrent(Long rptId) throws DaoException;
RecurrentPaymentTool getNotNull(String eventId);
RecurrentPaymentTool getNotNull(String recurrentPaymentToolId);
}

View File

@ -60,11 +60,11 @@ public class RecurrentPaymentToolDaoImpl extends AbstractGenericDao implements R
}
@Override
public RecurrentPaymentTool getNotNull(String eventId) {
RecurrentPaymentTool recurrentPaymentTool = get(eventId);
public RecurrentPaymentTool getNotNull(String recurrentPaymentToolId) {
RecurrentPaymentTool recurrentPaymentTool = get(recurrentPaymentToolId);
if (recurrentPaymentTool == null) {
throw new NotFoundException(
String.format("Recurrent payment tool not found, sourceId='%s'", eventId));
String.format("Recurrent payment tool not found, sourceId='%s'", recurrentPaymentToolId));
}
return recurrentPaymentTool;
}

View File

@ -47,8 +47,8 @@ public class DepositStatusChangedHandler implements DepositHandler {
String depositId = event.getSourceId();
log.info("Start deposit status changed handling, sequenceId={}, depositId={}", sequenceId, depositId);
final Deposit depositOld = depositDao.get(depositId);
Deposit depositNew =
depositMachineEventCopyFactory.create(event, sequenceId, depositId, timestampedChange.getOccuredAt());
Deposit depositNew = depositMachineEventCopyFactory
.create(event, sequenceId, depositId, depositOld, timestampedChange.getOccuredAt());
depositNew.setDepositStatus(TBaseUtil.unionFieldToEnum(status, DepositStatus.class));

View File

@ -47,8 +47,8 @@ public class DepositTransferStatusChangedHandler implements DepositHandler {
String depositId = event.getSourceId();
log.info("Start deposit transfer status changed handling, sequenceId={}, depositId={}", sequenceId, depositId);
final Deposit depositOld = depositDao.get(depositId);
Deposit depositNew =
depositMachineEventCopyFactory.create(event, sequenceId, depositId, timestampedChange.getOccuredAt());
Deposit depositNew = depositMachineEventCopyFactory
.create(event, sequenceId, depositId, depositOld, timestampedChange.getOccuredAt());
depositNew.setDepositTransferStatus(TBaseUtil.unionFieldToEnum(status, DepositTransferStatus.class));