Subversion Repositories SmartDukaan

Rev

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

Rev 25446 Rev 25447
Line 97... Line 97...
97
		return gson.fromJson(new BasicDBObject(result.toMap()).toJson(), ContentPojo.class);
97
		return gson.fromJson(new BasicDBObject(result.toMap()).toJson(), ContentPojo.class);
98
	}
98
	}
99
 
99
 
100
	public List<DBObject> getMongoBrands(int fofoId, String email, int categoryId) {
100
	public List<DBObject> getMongoBrands(int fofoId, String email, int categoryId) {
101
		List<DBObject> brandsDisplay = this.getBrandsToDisplay(categoryId);
101
		List<DBObject> brandsDisplay = this.getBrandsToDisplay(categoryId);
102
		if (EMAIL_BLOCKED_BRANDS.containsKey(email)) {
102
		if (EMAIL_BLOCKED_BRANDS.containsKey(email.toLowerCase())) {
103
			List<String> blockedBrands = EMAIL_BLOCKED_BRANDS.get(email);
103
			List<String> blockedBrands = EMAIL_BLOCKED_BRANDS.get(email);
104
			brandsDisplay = brandsDisplay.stream().filter(x -> !blockedBrands.contains(x.get("name")))
104
			brandsDisplay = brandsDisplay.stream().filter(x -> !blockedBrands.contains(x.get("name")))
105
					.collect(Collectors.toList());
105
					.collect(Collectors.toList());
106
		}
106
		}
107
		return brandsDisplay;
107
		return brandsDisplay;