| Line 656... |
Line 656... |
| 656 |
}
|
656 |
}
|
| 657 |
|
657 |
|
| 658 |
bulletinOfferModals.add(modal);
|
658 |
bulletinOfferModals.add(modal);
|
| 659 |
}
|
659 |
}
|
| 660 |
|
660 |
|
| - |
|
661 |
// 0️⃣ Thought of the Day (virtual bulletin)
|
| - |
|
662 |
BulletinOfferModal thoughtModal = new BulletinOfferModal();
|
| - |
|
663 |
thoughtModal.setOfferId(0L); // dummy
|
| - |
|
664 |
thoughtModal.setTitle("💡 Thought of the Day");
|
| - |
|
665 |
thoughtModal.setDescription(SalesThoughtConstants.getTodayThought());
|
| - |
|
666 |
thoughtModal.setCreatedAt(LocalDateTime.MAX); // IMPORTANT → always first
|
| - |
|
667 |
thoughtModal.setCreatedTime("");
|
| - |
|
668 |
thoughtModal.setCatalogOffer(false);
|
| - |
|
669 |
thoughtModal.setCreatedBy("SYSTEM");
|
| - |
|
670 |
thoughtModal.setBulletinType(ProfitMandiConstants.BULLETIN_TYPE_ENUM.BULLETIN);
|
| - |
|
671 |
|
| - |
|
672 |
bulletinOfferModals.add(thoughtModal);
|
| - |
|
673 |
|
| 661 |
|
674 |
|
| 662 |
List<BulletinOfferModal> getTodayCreatedCatalogOffer = todayOfferService.findAllTodayCatalogOfferBulletin(regionIds.stream().map(x -> x.intValue()).collect(Collectors.toList()), startDate, endDate);
|
675 |
List<BulletinOfferModal> getTodayCreatedCatalogOffer = todayOfferService.findAllTodayCatalogOfferBulletin(regionIds.stream().map(x -> x.intValue()).collect(Collectors.toList()), startDate, endDate);
|
| 663 |
bulletinOfferModals.addAll(getTodayCreatedCatalogOffer);
|
676 |
bulletinOfferModals.addAll(getTodayCreatedCatalogOffer);
|
| 664 |
|
677 |
|
| 665 |
List<BulletinOfferModal> getTodaySchemes = todayOfferService.findAllTodaySchemeBulletin(regionIds.stream().map(x -> x.intValue()).collect(Collectors.toList()), startDate, endDate);
|
678 |
List<BulletinOfferModal> getTodaySchemes = todayOfferService.findAllTodaySchemeBulletin(regionIds.stream().map(x -> x.intValue()).collect(Collectors.toList()), startDate, endDate);
|
| Line 681... |
Line 694... |
| 681 |
BulletinOfferModal::getBulletinType,
|
694 |
BulletinOfferModal::getBulletinType,
|
| 682 |
() -> new EnumMap<>(ProfitMandiConstants.BULLETIN_TYPE_ENUM.class),
|
695 |
() -> new EnumMap<>(ProfitMandiConstants.BULLETIN_TYPE_ENUM.class),
|
| 683 |
Collectors.toList()
|
696 |
Collectors.toList()
|
| 684 |
));
|
697 |
));
|
| 685 |
|
698 |
|
| - |
|
699 |
bulletinOfferModals.sort(
|
| - |
|
700 |
Comparator.comparing(BulletinOfferModal::getCreatedAt).reversed()
|
| - |
|
701 |
);
|
| - |
|
702 |
|
| - |
|
703 |
|
| 686 |
|
704 |
|
| 687 |
return bulletinOffermap;
|
705 |
return bulletinOffermap;
|
| 688 |
}
|
706 |
}
|
| 689 |
|
707 |
|
| 690 |
private Map<Integer, List<Integer>> getWarehouseIdFofoIdMap(Set<Integer> fofoIds) throws ProfitMandiBusinessException {
|
708 |
private Map<Integer, List<Integer>> getWarehouseIdFofoIdMap(Set<Integer> fofoIds) throws ProfitMandiBusinessException {
|