Subversion Repositories SmartDukaan

Rev

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

Rev 34361 Rev 34365
Line 273... Line 273...
273
    private static final Set<Integer> PREMIUM_ELIGIBLE_PARTNERS = new HashSet<>(Arrays.asList(175139615, 175139583));
273
    private static final Set<Integer> PREMIUM_ELIGIBLE_PARTNERS = new HashSet<>(Arrays.asList(175139615, 175139583));
274
    private static Map<ScratchedGift, Integer> GIFT_QUANTITIES = new HashMap<>();
274
    private static Map<ScratchedGift, Integer> GIFT_QUANTITIES = new HashMap<>();
275
    List<Double> PRICE_RANGE = Arrays.asList(0.0, Double.MAX_VALUE);
275
    List<Double> PRICE_RANGE = Arrays.asList(0.0, Double.MAX_VALUE);
276
 
276
 
277
    static {
277
    static {
278
        GIFT_QUANTITIES.put(ScratchedGift.ACCESSORIES_50_PERCENT_OFF, 700);
278
        GIFT_QUANTITIES.put(ScratchedGift.ACCESSORIES_50_PERCENT_OFF, 500);
279
        GIFT_QUANTITIES.put(ScratchedGift.NECK_BAND, 280);
279
        GIFT_QUANTITIES.put(ScratchedGift.NECK_BAND, 280);
280
        GIFT_QUANTITIES.put(ScratchedGift.LED, 1);
280
        GIFT_QUANTITIES.put(ScratchedGift.LED, 1);
281
        GIFT_QUANTITIES.put(ScratchedGift.MICROWAVE_OVEN, 1);
281
        GIFT_QUANTITIES.put(ScratchedGift.MICROWAVE_OVEN, 1);
282
    }
282
    }
283
 
283
 
284
    static {
284
    static {
285
        GIFT_SERIES.put(0.0, Arrays.asList(ScratchedGift.ACCESSORIES_50_PERCENT_OFF, ScratchedGift.NECK_BAND));
285
        GIFT_SERIES.put(0.0, Arrays.asList(ScratchedGift.ACCESSORIES_50_PERCENT_OFF, ScratchedGift.NECK_BAND));
286
        GIFT_SERIES.put(30001.0, Arrays.asList(ScratchedGift.ACCESSORIES_50_PERCENT_OFF, ScratchedGift.NECK_BAND, ScratchedGift.MICROWAVE_OVEN, ScratchedGift.LED));
286
        GIFT_SERIES.put(30001.0, Arrays.asList(ScratchedGift.NECK_BAND, ScratchedGift.MICROWAVE_OVEN, ScratchedGift.LED));
287
    }
287
    }
288
 
288
 
289
    private void persistNonSerializedWithCustomSerialNumber(CustomFofoOrderItem customFofoOrderItem, int orderItemId) {
289
    private void persistNonSerializedWithCustomSerialNumber(CustomFofoOrderItem customFofoOrderItem, int orderItemId) {
290
        // Create a new instance of FofoNonSerializeSerial
290
        // Create a new instance of FofoNonSerializeSerial
291
        for (String accSerialNumber : customFofoOrderItem.getCustomSerialNumbers()) {
291
        for (String accSerialNumber : customFofoOrderItem.getCustomSerialNumbers()) {
Line 814... Line 814...
814
                ProfitMandiConstants.SCRATCH_OFFER_START_DATE, ProfitMandiConstants.SCRATCH_OFFER_END_DATE
814
                ProfitMandiConstants.SCRATCH_OFFER_START_DATE, ProfitMandiConstants.SCRATCH_OFFER_END_DATE
815
        );
815
        );
816
        LOGGER.info("scratchOfferCountMap {}", scratchOfferCountMap);
816
        LOGGER.info("scratchOfferCountMap {}", scratchOfferCountMap);
817
 
817
 
818
        LocalDateTime startDateTime = ProfitMandiConstants.SCRATCH_OFFER_START_DATE.atStartOfDay();
818
        LocalDateTime startDateTime = ProfitMandiConstants.SCRATCH_OFFER_START_DATE.atStartOfDay();
819
        LocalDateTime endDateTime = ProfitMandiConstants.SCRATCH_OFFER_END_DATE.atStartOfDay().plusDays(1);
819
        LocalDateTime endDateTime = ProfitMandiConstants.SCRATCH_OFFER_START_DATE.atTime(LocalTime.MAX);
-
 
820
 
-
 
821
        LOGGER.info("start date {}", startDateTime);
-
 
822
        LOGGER.info("end date {}", endDateTime);
820
 
823
 
821
        RandomCollection<ScratchedGift> giftRandomCollection = createDynamicGiftSeries(scratchOfferCountMap, purchaseAmount, fofoId);
824
        RandomCollection<ScratchedGift> giftRandomCollection = createDynamicGiftSeries(scratchOfferCountMap, purchaseAmount, fofoId);
822
 
825
 
823
        if (giftRandomCollection.size() > 0) {
826
        if (giftRandomCollection.size() > 0) {
824
            ScratchedGift selectedGift = giftRandomCollection.next();
827
            ScratchedGift selectedGift = giftRandomCollection.next();