Subversion Repositories SmartDukaan

Rev

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

Rev 27120 Rev 27122
Line 24... Line 24...
24
import com.mongodb.MongoClient;
24
import com.mongodb.MongoClient;
25
import com.mongodb.client.AggregateIterable;
25
import com.mongodb.client.AggregateIterable;
26
import com.mongodb.client.MongoCollection;
26
import com.mongodb.client.MongoCollection;
27
import com.mongodb.client.MongoDatabase;
27
import com.mongodb.client.MongoDatabase;
28
import com.mongodb.util.JSON;
28
import com.mongodb.util.JSON;
-
 
29
import com.spice.profitmandi.common.util.Utils;
29
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaigns;
30
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaigns;
30
import com.spice.profitmandi.dao.model.ContentPojo;
31
import com.spice.profitmandi.dao.model.ContentPojo;
31
import com.spice.profitmandi.dao.model.FofoForm;
32
import com.spice.profitmandi.dao.model.FofoForm;
32
import com.spice.profitmandi.dao.model.RetailerFofoInterest;
33
import com.spice.profitmandi.dao.model.RetailerFofoInterest;
33
 
34
 
Line 144... Line 145...
144
		return cp;
145
		return cp;
145
	}
146
	}
146
 
147
 
147
	public List<DBObject> getMongoBrands(int fofoId, String email, int categoryId) {
148
	public List<DBObject> getMongoBrands(int fofoId, String email, int categoryId) {
148
		List<DBObject> brandsDisplay = this.getBrandsToDisplay(categoryId);
149
		List<DBObject> brandsDisplay = this.getBrandsToDisplay(categoryId);
-
 
150
		if(fofoId==Utils.SYSTEM_PARTNER_ID) {
-
 
151
			return brandsDisplay; 
-
 
152
		}
149
		Iterator<DBObject> brandsDisplayIterator = brandsDisplay.iterator();
153
		Iterator<DBObject> brandsDisplayIterator = brandsDisplay.iterator();
150
		List<String> partnerAllowedBrands = PARTNER_ALLOWED_BRANDS.get(fofoId);
154
		List<String> partnerAllowedBrands = PARTNER_ALLOWED_BRANDS.get(fofoId);
151
		while(brandsDisplayIterator.hasNext()) {
155
		while(brandsDisplayIterator.hasNext()) {
152
			String brand = brandsDisplayIterator.next().get("name").toString();
156
			String brand = brandsDisplayIterator.next().get("name").toString();
153
			if(BLOCKED_BRANDS.contains(brand)) {
157
			if(BLOCKED_BRANDS.contains(brand)) {