Subversion Repositories SmartDukaan

Rev

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

Rev 23568 Rev 23936
Line 60... Line 60...
60
	@RequestMapping(value = ProfitMandiConstants.URL_ADDRESS_ALL, method=RequestMethod.GET)
60
	@RequestMapping(value = ProfitMandiConstants.URL_ADDRESS_ALL, method=RequestMethod.GET)
61
	public ResponseEntity<?> getAll(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PAGE_NUMBER) int pageNumber, @RequestParam(name = ProfitMandiConstants.PAGE_SIZE) int pageSize) throws Throwable{
61
	public ResponseEntity<?> getAll(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PAGE_NUMBER) int pageNumber, @RequestParam(name = ProfitMandiConstants.PAGE_SIZE) int pageSize) throws Throwable{
62
		int userId = (int)request.getAttribute("userId");
62
		int userId = (int)request.getAttribute("userId");
63
		UserCart uc  = userAccountRepository.getUserCart(userId);
63
		UserCart uc  = userAccountRepository.getUserCart(userId);
64
		LOGGER.info("requested url : "+request.getRequestURL().toString());
64
		LOGGER.info("requested url : "+request.getRequestURL().toString());
65
		return responseSender.ok(addressRepository.selectAll(uc.getUserId(), pageNumber, pageSize));
65
		return responseSender.ok(addressRepository.selectAllByRetailerId(uc.getUserId(), pageNumber, pageSize));
66
	}
66
	}
67
	
67
	
68
	@RequestMapping(value = ProfitMandiConstants.URL_ADDRESS_ID, method=RequestMethod.GET)
68
	@RequestMapping(value = ProfitMandiConstants.URL_ADDRESS_ID, method=RequestMethod.GET)
69
	public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id){
69
	public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id){
70
		LOGGER.info("requested url : "+request.getRequestURL().toString());
70
		LOGGER.info("requested url : "+request.getRequestURL().toString());