- updated swagger description

- changed customer registration endpoint
- updated tests
This commit is contained in:
Main
2016-02-09 22:17:27 +03:00
parent cd35ac3d31
commit 92d0940222
19 changed files with 124 additions and 109 deletions

View File

@@ -26,11 +26,11 @@ public class CustomerInfoUpdateService {
this.mongoTemplate = mongoTemplate;
}
public void create(String id, CustomerInfo customerInfo) {
public void create(String id, String firstName, String lastName, CustomerInfo customerInfo) {
try {
accountInfoRepository.save(new QuerySideCustomer(id,
"",
"",
firstName,
lastName,
customerInfo.getEmail(),
customerInfo.getSsn(),
customerInfo.getPhoneNumber(),

View File

@@ -30,7 +30,7 @@ public class CustomerQueryWorkflow implements CompoundEventHandler {
CustomerCreatedEvent event = de.event();
String id = de.getEntityIdentifier().getId();
customerInfoUpdateService.create(id, event.getCustomerInfo());
customerInfoUpdateService.create(id, event.getFirstName(), event.getLastName(), event.getCustomerInfo());
return Observable.just(null);
}
@EventHandlerMethod

View File

@@ -19,8 +19,8 @@ public class QuerySideCustomerConfiguration {
}
@Bean
public CustomerInfoUpdateService customerInfoUpdateService(QuerySideCustomerRepository querySideCustomerRepository) {
return new CustomerInfoUpdateService(querySideCustomerRepository);
public CustomerInfoUpdateService customerInfoUpdateService(QuerySideCustomerRepository querySideCustomerRepository, MongoTemplate mongoTemplate) {
return new CustomerInfoUpdateService(querySideCustomerRepository, mongoTemplate);
}
@Bean