Subversion Repositories SmartDukaan

Rev

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

Rev 21496 Rev 21691
Line 98... Line 98...
98
	@ApiOperation(value = "Create Retailer")
98
	@ApiOperation(value = "Create Retailer")
99
	@RequestMapping(value = ProfitMandiConstants.URL_RETAILER, method=RequestMethod.POST)
99
	@RequestMapping(value = ProfitMandiConstants.URL_RETAILER, method=RequestMethod.POST)
100
	public ResponseEntity<?> createRetailer(HttpServletRequest request, @RequestBody CreateRetailerRequest createRetailerRequest){
100
	public ResponseEntity<?> createRetailer(HttpServletRequest request, @RequestBody CreateRetailerRequest createRetailerRequest){
101
		LOGGER.info("requested url : "+request.getRequestURL().toString());
101
		LOGGER.info("requested url : "+request.getRequestURL().toString());
102
		try{
102
		try{
103
			UserInfo userInfo = (UserInfo)request.getAttribute("userinfo");
103
			UserInfo userInfo = (UserInfo)request.getAttribute("userInfo");
104
			User user = userRepository.selectById(userInfo.getUserId());
104
			User user = userRepository.selectById(userInfo.getUserId());
105
			this.createRetailer(user.getEmailId(), createRetailerRequest);
105
			this.createRetailer(user.getEmailId(), createRetailerRequest);
106
			return responseSender.ok(ResponseCodeHolder.getMessage("RTLR_OK_1000"));
106
			return responseSender.ok(ResponseCodeHolder.getMessage("RTLR_OK_1000"));
107
		}catch (ProfitMandiBusinessException profitMandiBusinessException) {
107
		}catch (ProfitMandiBusinessException profitMandiBusinessException) {
108
			LOGGER.error("ProfitMandi error: ", profitMandiBusinessException);
108
			LOGGER.error("ProfitMandi error: ", profitMandiBusinessException);