Subversion Repositories SmartDukaan

Rev

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

Rev 33675 Rev 33677
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
        }