Subversion Repositories SmartDukaan

Rev

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

Rev 33151 Rev 33152
Line 850... Line 850...
850
                .add(100d, ScratchedGift.BLUETOOTH_SPEAKER)
850
                .add(100d, ScratchedGift.BLUETOOTH_SPEAKER)
851
                .add(150d, ScratchedGift.RED_WATER_BOTTLE)
851
                .add(150d, ScratchedGift.RED_WATER_BOTTLE)
852
                .add(200d, ScratchedGift.GIFT_BOWL)
852
                .add(200d, ScratchedGift.GIFT_BOWL)
853
                .add(100d, ScratchedGift.EARBUDS);
853
                .add(100d, ScratchedGift.EARBUDS);
854
 
854
 
855
        ScratchedGift gift = ScratchedGift.BLNT;
855
        ScratchedGift gift = ScratchedGift.RED_WATER_BOTTLE;
856
 
856
 
857
        Random random = new Random();
857
        Random random = new Random();
858
        int rand;
858
        int rand;
859
        while (true) {
859
        while (true) {
860
            rand = random.nextInt(6);
860
            rand = random.nextInt(6);
861
            if (rand != 0) break;
861
            if (rand != 0) break;
862
        }
862
        }
863
 
863
 
864
        List<ScratchOffer> lastScratchOffers = scratchOfferRepository.selectBycCustomerIdAndDate(customerId, ProfitMandiConstants.LAST_SCRATCH_OFFER_START_DATE, ProfitMandiConstants.LAST_SCRATCH_OFFER_END_DATE);
864
        List<ScratchOffer> lastScratchOffers = scratchOfferRepository.selectBycCustomerIdAndDate(customerId, ProfitMandiConstants.LAST_SCRATCH_OFFER_START_DATE, ProfitMandiConstants.LAST_SCRATCH_OFFER_END_DATE);
865
 
865
//
866
        if (lastScratchOffers.isEmpty()) {
866
//        if (lastScratchOffers.isEmpty()) {
867
            gift = map1.next();
867
//            gift = map1.next();
868
        } else {
868
//        } else {
869
            gift = ScratchedGift.RED_WATER_BOTTLE;
869
//            gift = ScratchedGift.RED_WATER_BOTTLE;
870
            LOGGER.info("RED_WATER_BOTTLE {}", gift);
870
//            LOGGER.info("RED_WATER_BOTTLE {}", gift);
871
        }
871
//        }
872
        return gift;
872
        return gift;
873
    }
873
    }
874
 
874
 
875
    private HygieneData createAndGetHygieneData(int id, int fofoId) {
875
    private HygieneData createAndGetHygieneData(int id, int fofoId) {
876
        HygieneData hygieneData = new HygieneData();
876
        HygieneData hygieneData = new HygieneData();