Subversion Repositories SmartDukaan

Rev

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

Rev 8143 Rev 8865
Line 374... Line 374...
374
 
374
 
375
	private Map<Long, Integer> getPolularityMap() {
375
	private Map<Long, Integer> getPolularityMap() {
376
		try {
376
		try {
377
			Reader reader = new FileReader(Utils.EXPORT_PATH + Utils.POPULARITY_JSON);
377
			Reader reader = new FileReader(Utils.EXPORT_PATH + Utils.POPULARITY_JSON);
378
			return new Gson().fromJson(reader, new TypeToken<Map<Long, Integer>>() {}.getType());
378
			return new Gson().fromJson(reader, new TypeToken<Map<Long, Integer>>() {}.getType());
379
		} catch (FileNotFoundException e) {
379
		} catch (Exception e) {
380
			log.error("Could not read popularity file");
380
			log.error("Could not read popularity file");
381
			e.printStackTrace();
381
			e.printStackTrace();
382
			return new HashMap<Long, Integer>();
382
			return new HashMap<Long, Integer>();
383
		}
383
		}
384
    	
384
    	
Line 606... Line 606...
606
            if (!(item.getItemStatus() == status.ACTIVE
606
            if (!(item.getItemStatus() == status.ACTIVE
607
                    || item.getItemStatus() == status.CONTENT_COMPLETE || item
607
                    || item.getItemStatus() == status.CONTENT_COMPLETE || item
608
                    .getItemStatus() == status.PAUSED || item.getItemStatus() == status.COMING_SOON)) {
608
                    .getItemStatus() == status.PAUSED || item.getItemStatus() == status.COMING_SOON)) {
609
                continue;
609
                continue;
610
            }
610
            }
-
 
611
            SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
611
            Utils.info(item.getStartDate() + ":" + item.getSellingPrice());
612
            Utils.info(df1.format(item.getStartDate()) + ":" + item.getSellingPrice());
612
            
613
            
613
			if (todate.getTime() < item.getStartDate()
614
			if (todate.getTime() < item.getStartDate()
614
					&& (!item.isSetExpectedArrivalDate() || todate.getTime() < item.getComingSoonStartDate()) 
615
					&& (!item.isSetExpectedArrivalDate() || todate.getTime() < item.getComingSoonStartDate()) 
615
					|| item.getSellingPrice() == 0) {
616
					|| item.getSellingPrice() == 0) {
616
				continue;
617
				continue;