| Line 2375... |
Line 2375... |
| 2375 |
|
2375 |
|
| 2376 |
public void reverseWallet() throws Exception {
|
2376 |
public void reverseWallet() throws Exception {
|
| 2377 |
LocalDate localDate = LocalDate.of(2020, 10, 28);
|
2377 |
LocalDate localDate = LocalDate.of(2020, 10, 28);
|
| 2378 |
List<UserWalletHistory> uwhList = userWalletHistoryRepository.selectAllByDateType(localDate.atStartOfDay(), localDate.plusDays(1).atStartOfDay(),
|
2378 |
List<UserWalletHistory> uwhList = userWalletHistoryRepository.selectAllByDateType(localDate.atStartOfDay(), localDate.plusDays(1).atStartOfDay(),
|
| 2379 |
Arrays.asList(WalletReferenceType.SCHEME_IN, WalletReferenceType.SCHEME_OUT));
|
2379 |
Arrays.asList(WalletReferenceType.SCHEME_IN, WalletReferenceType.SCHEME_OUT));
|
| 2380 |
int amount = 0;
|
- |
|
| 2381 |
for (UserWalletHistory uwh : uwhList) {
|
2380 |
for (UserWalletHistory uwh : uwhList) {
|
| 2382 |
if(uwh.getBusinessTimestamp().getMonth().equals(Month.SEPTEMBER)) {
|
2381 |
if(uwh.getBusinessTimestamp().getMonth().equals(Month.SEPTEMBER)) {
|
| 2383 |
LOGGER.info("UWH - {}", uwh);
|
2382 |
LOGGER.info("UWH - {}", uwh);
|
| 2384 |
amount += uwh.getAmount();
|
2383 |
//amount += uwh.getAmount();
|
| 2385 |
System.out.println("Amount is - " + amount);
|
2384 |
//System.out.println("Amount is - " + amount);
|
| 2386 |
//walletService.rollbackAmountFromWallet(uwh.getFofoId(), uwh.getAmount(), uwh.getReference(), uwh.getReferenceType(), "Margin reversal for error prone run", uwh.getBusinessTimestamp());
|
2385 |
walletService.rollbackAmountFromWallet(uwh.getFofoId(), uwh.getAmount(), uwh.getReference(), uwh.getReferenceType(), "Margin reversal for error prone run", uwh.getBusinessTimestamp());
|
| 2387 |
}
|
2386 |
}
|
| 2388 |
}
|
2387 |
}
|
| 2389 |
|
2388 |
|
| 2390 |
}
|
2389 |
}
|
| 2391 |
|
2390 |
|