| Line 780... |
Line 780... |
| 780 |
rechargeTransactionRepository.persist(rt);
|
780 |
rechargeTransactionRepository.persist(rt);
|
| 781 |
}
|
781 |
}
|
| 782 |
LOGGER.info("Cashbacks for Recharge processed Successfully");
|
782 |
LOGGER.info("Cashbacks for Recharge processed Successfully");
|
| 783 |
}
|
783 |
}
|
| 784 |
|
784 |
|
| 785 |
public void rollOutUpgardedMargins() {
|
785 |
public void rollOutUpgardedMargins() throws Exception {
|
| 786 |
List<Integer> fofoIds = Arrays.asList(175138968, 175138957, 175138952, 175138934);
|
786 |
List<Integer> fofoIds = Arrays.asList(175138968, 175138957, 175138952, 175138934);
|
| - |
|
787 |
LocalDate today = LocalDate.now();
|
| - |
|
788 |
LocalDate yesterday = today.minusDays(1);
|
| - |
|
789 |
|
| 787 |
List<FofoStore> stores = fofoStoreRepository.selectActiveStores();
|
790 |
List<FofoStore> stores = fofoStoreRepository.selectActiveStores();
|
| 788 |
for(FofoStore store : stores) {
|
791 |
for(FofoStore store : stores) {
|
| 789 |
if(fofoIds.contains(store.getId())) {
|
792 |
if(fofoIds.contains(store.getId())) {
|
| 790 |
int fofoId = store.getId();
|
793 |
int fofoId = store.getId();
|
| 791 |
PartnerType yesterdayPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, LocalDate.now().minusDays(1));
|
794 |
PartnerType yesterdayPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, yesterday);
|
| 792 |
PartnerType todayPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, LocalDate.now());
|
795 |
PartnerType todayPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, today);
|
| 793 |
if(!yesterdayPartnerType.equals(todayPartnerType)) {
|
796 |
if(!yesterdayPartnerType.equals(todayPartnerType)) {
|
| 794 |
LOGGER.info("Partner Type has been changed for code {} from {} to {}", store.getCode(), yesterdayPartnerType, todayPartnerType);
|
797 |
LOGGER.info("Partner Type has been changed for code {} from {} to {}", store.getCode(), yesterdayPartnerType, todayPartnerType);
|
| - |
|
798 |
List<FofoOrder> fofoOrders = fofoOrderRepository.selectByFofoId(fofoId, yesterday.withDayOfMonth(1).atStartOfDay(), yesterday.atTime(LocalTime.MAX), 0,0);
|
| - |
|
799 |
for(FofoOrder fofoOrder : fofoOrders) {
|
| - |
|
800 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoId);
|
| - |
|
801 |
}
|
| 795 |
}
|
802 |
}
|
| 796 |
}
|
803 |
}
|
| 797 |
}
|
804 |
}
|
| 798 |
}
|
805 |
}
|
| 799 |
|
806 |
|