Subversion Repositories SmartDukaan

Rev

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

Rev 23192 Rev 23373
Line 100... Line 100...
100
	
100
	
101
	@RequestMapping(value = "/checkItemAvailability")
101
	@RequestMapping(value = "/checkItemAvailability")
102
	public String getItemAvailability(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ITEM_ID) int itemId, Model model) throws ProfitMandiBusinessException{
102
	public String getItemAvailability(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ITEM_ID) int itemId, Model model) throws ProfitMandiBusinessException{
103
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
103
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
104
		CustomCurrentInventorySnapshot customCurrentInventorySnapshot = inventoryService.checkItemAvailability(itemId, loginDetails.getFofoId());
104
		CustomCurrentInventorySnapshot customCurrentInventorySnapshot = inventoryService.checkItemAvailability(itemId, loginDetails.getFofoId());
-
 
105
		try {
105
		customCurrentInventorySnapshot.setIconUrl(Utils.getIconUrl(customCurrentInventorySnapshot.getCatalogItemId(), host, port, webapp));
106
			customCurrentInventorySnapshot.setIconUrl(Utils.getIconUrl(customCurrentInventorySnapshot.getCatalogItemId(), host, port, webapp));
-
 
107
		} catch (Exception e) {
-
 
108
			customCurrentInventorySnapshot.setIconUrl("");
-
 
109
			
-
 
110
		}
106
		model.addAttribute("currentInventorySnapshot", new Gson().toJson(customCurrentInventorySnapshot));
111
		model.addAttribute("currentInventorySnapshot", new Gson().toJson(customCurrentInventorySnapshot));
107
		return "current-item-availability";
112
		return "current-item-availability";
108
		
113
		
109
	}
114
	}
110
	
115