Subversion Repositories SmartDukaan

Rev

Rev 23745 | Rev 23747 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23745 Rev 23746
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 45 7 1,16 * *")
254
	@Scheduled(cron = "0 30 10 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()) {