| Line 249... |
Line 249... |
| 249 |
}
|
249 |
}
|
| 250 |
}
|
250 |
}
|
| 251 |
LOGGER.info("Schemes process successfully.");
|
251 |
LOGGER.info("Schemes process successfully.");
|
| 252 |
}
|
252 |
}
|
| 253 |
|
253 |
|
| 254 |
@Scheduled(cron = "0 00 12 1,16 * ?")
|
254 |
@Scheduled(cron = "0 05 12 1,16 * ?")
|
| 255 |
public void processRechargeCashback() throws Throwable {
|
255 |
public void processRechargeCashback() throws Throwable {
|
| 256 |
int referenceId = (int)Timestamp.valueOf(LocalDateTime.now()).getTime()/1000;
|
256 |
int referenceId = (int)Timestamp.valueOf(LocalDateTime.now()).getTime()/1000;
|
| 257 |
List<RechargeTransaction> pendingTransactions = rechargeTransactionRepository.getPendingCashBackRehargeTransactions();
|
257 |
List<RechargeTransaction> pendingTransactions = rechargeTransactionRepository.getPendingCashBackRehargeTransactions();
|
| 258 |
Map<Object, Double> totalRetailerCashbacks = pendingTransactions.stream().collect(Collectors.groupingBy(x->x.getId(), Collectors.summingDouble(x->x.getCommission())));
|
258 |
Map<Object, Double> totalRetailerCashbacks = pendingTransactions.stream().collect(Collectors.groupingBy(x->x.getId(), Collectors.summingDouble(x->x.getCommission())));
|
| 259 |
for (Map.Entry<Object, Double>totalRetailerCashback : totalRetailerCashbacks.entrySet()) {
|
259 |
for (Map.Entry<Object, Double>totalRetailerCashback : totalRetailerCashbacks.entrySet()) {
|