- splitted account deletion to 2 separate endpoints: /api/customers/{customerId}/toaccounts/{accountId} and /api/accounts/{accountId}
- simplified the tests - cleared the code
This commit is contained in:
@@ -59,12 +59,10 @@ public class AccountInfoUpdateService {
|
||||
|
||||
|
||||
public void addTransaction(String accountId, AccountTransactionInfo ti) {
|
||||
System.out.println("Start addTransaction for: "+ti.toString());
|
||||
mongoTemplate.upsert(new Query(where("id").is(accountId)),
|
||||
new Update().
|
||||
set("transactions." + ti.getTransactionId(), ti),
|
||||
AccountInfo.class);
|
||||
System.out.println("End addTransaction for: "+ti.toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -78,11 +76,9 @@ public class AccountInfoUpdateService {
|
||||
}
|
||||
|
||||
public void updateTransactionStatus(String accountId, String transactionId, TransferState status) {
|
||||
System.out.println("Start updateTransactionStatus "+accountId +" "+transactionId+" "+status);
|
||||
mongoTemplate.upsert(new Query(where("id").is(accountId)),
|
||||
new Update().
|
||||
set("transactions." + transactionId + ".status", status),
|
||||
AccountInfo.class);
|
||||
System.out.println("End updateTransactionStatus "+accountId +" "+transactionId+" "+status);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user