| Line 58... |
Line 58... |
| 58 |
}
|
58 |
}
|
| 59 |
}
|
59 |
}
|
| 60 |
|
60 |
|
| 61 |
@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
|
61 |
@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
|
| 62 |
public String createScheme(HttpServletRequest request, Model model) throws Exception {
|
62 |
public String createScheme(HttpServletRequest request, Model model) throws Exception {
|
| 63 |
LocalDateTime fromDate = LocalDateTime.now().minusDays(45);
|
63 |
LocalDateTime fromDate = LocalDateTime.now().minusDays(15);
|
| 64 |
LOGGER.info("Started execution at {}", LocalDateTime.now());
|
64 |
LOGGER.info("Started execution at {}", LocalDateTime.now());
|
| 65 |
List<Purchase> purchases = purchaseRepository.selectFromPurchaseCompleteDate(fromDate);
|
65 |
List<Purchase> purchases = purchaseRepository.selectFromPurchaseCompleteDate(fromDate);
|
| 66 |
for (Purchase purchase : purchases) {
|
66 |
for (Purchase purchase : purchases) {
|
| 67 |
try {
|
67 |
try {
|
| 68 |
schemeService.processSchemeIn(purchase.getId(), purchase.getFofoId());
|
68 |
schemeService.processSchemeIn(purchase.getId(), purchase.getFofoId());
|