Subversion Repositories SmartDukaan

Rev

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

Rev 25512 Rev 25513
Line 606... Line 606...
606
		// throw new Exception();
606
		// throw new Exception();
607
	}
607
	}
608
 
608
 
609
	public void fixSchemePayouts() throws Exception {
609
	public void fixSchemePayouts() throws Exception {
610
 
610
 
611
		LocalDateTime startDate = LocalDate.of(2019, 9, 1).atStartOfDay();
611
		LocalDateTime startDate = LocalDateTime.of(2019, 9, 1, 16,45, 53);
-
 
612
		LocalDateTime endDate = LocalDateTime.of(2019, 9, 1, 16, 46, 32);
612
		List<SchemeInOut> sios = schemeInOutRepository.selectAllByCreateDate(startDate, LocalDateTime.now());
613
		List<SchemeInOut> sios = schemeInOutRepository.selectAllByCreateDate(startDate, endDate);
613
 
614
 
614
		for (SchemeInOut sio : sios) {
615
		for (SchemeInOut sio : sios) {
615
			genericRepository.delete(sio);
616
			genericRepository.delete(sio);
616
			InventoryItem ii = inventoryItemRepository.selectById(sio.getInventoryItemId());
617
			InventoryItem ii = inventoryItemRepository.selectById(sio.getInventoryItemId());
617
			UserWallet userWallet = userWalletRepository.selectByRetailerId(ii.getFofoId());
618
			UserWallet userWallet = userWalletRepository.selectByRetailerId(ii.getFofoId());
Line 647... Line 648...
647
			}
648
			}
648
 
649
 
649
			//System.out.println("Total Amount Rolled Back is " + totalRollbackAmount);
650
			//System.out.println("Total Amount Rolled Back is " + totalRollbackAmount);
650
		}
651
		}
651
		//scheduledTasks.processScheme(startDate, startDate.plusDays(10));
652
		//scheduledTasks.processScheme(startDate, startDate.plusDays(10));
652
		throw new Exception();
653
		//throw new Exception();
653
	}
654
	}
654
}
655
}
655
 
656
 
656
//7015845171
657
//7015845171
657
658