Fix revision

This commit is contained in:
k.struzhkin 2020-04-07 14:45:46 +03:00
parent 125b656e0d
commit 2ff95745c4
18 changed files with 18 additions and 15 deletions

View File

@ -59,7 +59,7 @@ public class ContractAdjustmentCreatedHandler extends AbstractClaimChangedHandle
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -57,7 +57,7 @@ public class ContractContractorIDChangedHandler extends AbstractClaimChangedHand
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -64,6 +64,7 @@ public class ContractCreatedHandler extends AbstractClaimChangedHandler {
log.info("Start contract created handling, eventId={}, partyId={}, contractId={}", eventId, partyId, contractId);
Contract contract = new Contract();
contract.setEventId(eventId);
contract.setRevision(-1L);
contract.setSequenceId(event.getSequence());
contract.setChangeId(changeId);
contract.setClaimEffectId(i);

View File

@ -59,7 +59,7 @@ public class ContractLegalAgreementBoundHandler extends AbstractClaimChangedHand
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -59,7 +59,7 @@ public class ContractPayoutToolCreatedHandler extends AbstractClaimChangedHandle
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -59,7 +59,7 @@ public class ContractReportPreferencesChangedHandler extends AbstractClaimChange
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -59,7 +59,7 @@ public class ContractStatusChangedHandler extends AbstractClaimChangedHandler {
}
Long contractSourceId = contractSource.getId();
contractSource.setId(null);
contractSource.setRevision(null);
contractSource.setRevision(-1L);
contractSource.setWtime(null);
contractSource.setEventId(eventId);
contractSource.setSequenceId(event.getSequence());

View File

@ -51,7 +51,7 @@ public class ShopAccountCreatedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setChangeId(changeId);

View File

@ -48,7 +48,7 @@ public class ShopBlockingHandler extends AbstractPartyManagementHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -48,7 +48,7 @@ public class ShopCategoryChangedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setSequenceId(event.getSequence());
shopSource.setChangeId(changeId);

View File

@ -46,7 +46,7 @@ public class ShopContractChangedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -54,6 +54,7 @@ public class ShopCreatedHandler extends AbstractClaimChangedHandler {
String partyId = event.getSource().getPartyId();
log.info("Start shop created handling, eventId={}, partyId={}, shopId={}", eventId, partyId, shopId);
com.rbkmoney.newway.domain.tables.pojos.Shop shop = new com.rbkmoney.newway.domain.tables.pojos.Shop();
shop.setRevision(-1L);
shop.setEventId(eventId);
shop.setSequenceId(event.getSequence());
shop.setChangeId(changeId);

View File

@ -50,7 +50,7 @@ public class ShopDetailsChangedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -50,7 +50,7 @@ public class ShopLocationChangedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -45,7 +45,7 @@ public class ShopPayoutScheduleChangedHandler extends AbstractClaimChangedHandle
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -49,7 +49,7 @@ public class ShopPayoutToolChangedHandler extends AbstractClaimChangedHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -47,7 +47,7 @@ public class ShopSuspensionHandler extends AbstractPartyManagementHandler {
throw new NotFoundException(String.format("Shop not found, shopId='%s'", shopId));
}
shopSource.setId(null);
shopSource.setRevision(null);
shopSource.setRevision(-1L);
shopSource.setWtime(null);
shopSource.setEventId(eventId);
shopSource.setSequenceId(event.getSequence());

View File

@ -15,6 +15,7 @@ public class ContractorUtil {
com.rbkmoney.damsel.domain.Contractor contractorSource,
String contractorId, Integer changeId, Integer sequenceId) {
Contractor contractor = new Contractor();
contractor.setRevision(-1L);
contractor.setEventId(eventId);
contractor.setSequenceId(sequenceId);
contractor.setChangeId(changeId);