| Line 760... |
Line 760... |
| 760 |
Map<ScratchedGift, Long> scratchOfferCountMap = scratchOfferRepository.countOffersByDateRange(ProfitMandiConstants.SCRATCH_OFFER_START_DATE, ProfitMandiConstants.SCRATCH_OFFER_END_DATE);
|
760 |
Map<ScratchedGift, Long> scratchOfferCountMap = scratchOfferRepository.countOffersByDateRange(ProfitMandiConstants.SCRATCH_OFFER_START_DATE, ProfitMandiConstants.SCRATCH_OFFER_END_DATE);
|
| 761 |
|
761 |
|
| 762 |
RandomCollection<ScratchedGift> giftRandomCollection = createDynamicGiftSeries(scratchOfferCountMap, purchaseAmount);
|
762 |
RandomCollection<ScratchedGift> giftRandomCollection = createDynamicGiftSeries(scratchOfferCountMap, purchaseAmount);
|
| 763 |
if (giftRandomCollection.size() > 0) {
|
763 |
if (giftRandomCollection.size() > 0) {
|
| 764 |
return giftRandomCollection.next();
|
764 |
return giftRandomCollection.next();
|
| 765 |
} else if (purchaseAmount > 35000) {
|
765 |
} else if (purchaseAmount < 35000) {
|
| 766 |
// Default gift if no match found
|
766 |
// Default gift if no match found
|
| 767 |
return ScratchedGift.EW;
|
767 |
return ScratchedGift.EW;
|
| 768 |
} else {
|
768 |
} else {
|
| 769 |
return ScratchedGift.BLNT;
|
769 |
return ScratchedGift.BLNT;
|
| 770 |
}
|
770 |
}
|