Subversion Repositories SmartDukaan

Rev

Rev 31498 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31498 Rev 31499
Line 236... Line 236...
236
 
236
 
237
	@RequestMapping(value = "/addBrands", method = RequestMethod.POST)
237
	@RequestMapping(value = "/addBrands", method = RequestMethod.POST)
238
	public String addBrands(HttpServletRequest request, Model model) throws Exception {
238
	public String addBrands(HttpServletRequest request, Model model) throws Exception {
239
 
239
 
240
		List<DBObject> mobileBrands = mongoClient.getAllBrandsToDisplay(6);
240
		List<DBObject> mobileBrands = mongoClient.getAllBrandsToDisplay(6);
-
 
241
 
241
		for (DBObject mobileBrand : mobileBrands) {
242
		for (DBObject mobileBrand : mobileBrands) {
-
 
243
 
-
 
244
			LOGGER.info("mobileBrands{}", mobileBrand);
-
 
245
 
242
			String brandName = (String) mobileBrand.get("name");
246
			String brandName = (String) mobileBrand.get("name");
243
			BrandCatalog brand = brandsRepository.selectByBrand(brandName);
247
			BrandCatalog brand = brandsRepository.selectByBrand(brandName);
244
 
248
 
245
			if (brand == null) {
249
			if (brand == null) {
246
				brand = new BrandCatalog();
250
				brand = new BrandCatalog();