Subversion Repositories SmartDukaan

Rev

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

Rev 27869 Rev 28101
Line 270... Line 270...
270
			@RequestParam(value = "hotDeal", required = false) boolean hotDeal) throws Throwable {
270
			@RequestParam(value = "hotDeal", required = false) boolean hotDeal) throws Throwable {
271
		List<FofoCatalogResponse> dealResponse = new ArrayList<>();
271
		List<FofoCatalogResponse> dealResponse = new ArrayList<>();
272
		UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
272
		UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
273
		FofoStore fs = fofoStoreRepository.selectByRetailerId(userInfo.getRetailerId());
273
		FofoStore fs = fofoStoreRepository.selectByRetailerId(userInfo.getRetailerId());
274
		sort = "w" + fs.getWarehouseId() + "_i desc"; 
274
		sort = "w" + fs.getWarehouseId() + "_i desc"; 
-
 
275
		logger.info("log me");
275
		dealResponse = this.getCatalogResponse(
276
		dealResponse = this.getCatalogResponse(
276
				solrService.getSolrDocs(queryTerm, categoryId, offset, limit, sort, brand, subCategoryId, hotDeal),
277
				solrService.getSolrDocs(queryTerm, categoryId, offset, limit, sort, brand, subCategoryId, hotDeal),
277
				hotDeal, userInfo.getRetailerId());
278
				hotDeal, userInfo.getRetailerId());
-
 
279
		logger.info(dealResponse);
-
 
280
		logger.info("log me");
278
		return responseSender.ok(dealResponse);
281
		return responseSender.ok(dealResponse);
279
	}
282
	}
280
 
283
 
281
	@ApiImplicitParams({
284
	@ApiImplicitParams({
282
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
285
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
Line 702... Line 705...
702
							} else {
705
							} else {
703
								fdi.setAvailability(0);
706
								fdi.setAvailability(0);
704
							}
707
							}
705
						} else {
708
						} else {
706
							fdi.setAvailability(100);
709
							fdi.setAvailability(100);
-
 
710
							Item item = null;
-
 
711
							try  {
707
							Item item = itemRepository.selectById(itemId);
712
								item = itemRepository.selectById(itemId);
-
 
713
							} catch(Exception e) {
-
 
714
								e.printStackTrace();
-
 
715
								continue;
-
 
716
							}
708
							// In case its tampered glass moq should be 5
717
							// In case its tampered glass moq should be 5
709
							if (item.getCategoryId() == 10020) {
718
							if (item.getCategoryId() == 10020) {
710
								fdi.setMinBuyQuantity(5);
719
								fdi.setMinBuyQuantity(5);
711
							}
720
							}
712
						}
721
						}