Subversion Repositories SmartDukaan

Rev

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

Rev 21740 Rev 21795
Line 89... Line 89...
89
	@RequestMapping(value = ProfitMandiConstants.URL_MY_WALLET_HISTORY, method=RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
89
	@RequestMapping(value = ProfitMandiConstants.URL_MY_WALLET_HISTORY, method=RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
90
	@ApiImplicitParams({
90
	@ApiImplicitParams({
91
		@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", 
91
		@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", 
92
				required = true, dataType = "string", paramType = "header")
92
				required = true, dataType = "string", paramType = "header")
93
	})
93
	})
94
	@ApiOperation(value = "")
-
 
95
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request){
94
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request){
96
		int userId = (int)request.getAttribute("userId");
95
		int userId = (int)request.getAttribute("userId");
97
		UserAccounts userAccount;
96
		UserAccounts userAccount;
98
		List<UserWalletHistory> walletHistory;
97
		List<UserWalletHistory> walletHistory;
99
		try {
98
		try {
Line 122... Line 121...
122
				uwhr.setReference_type(uwh.getReference_type().toString());
121
				uwhr.setReference_type(uwh.getReference_type().toString());
123
			}
122
			}
124
			catch(Exception e){
123
			catch(Exception e){
125
				uwhr.setReference_type("");
124
				uwhr.setReference_type("");
126
			}
125
			}
127
			try{
-
 
128
			uwhr.setSub_reference_type(uwh.getSub_reference_type().toString());
-
 
129
			}
-
 
130
			catch(Exception e){
-
 
131
				uwhr.setSub_reference_type("");
-
 
132
			}
-
 
133
			uwhr.setTimestamp(uwh.getTimestamp().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
126
			uwhr.setTimestamp(uwh.getTimestamp().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
134
			uwhr.setDescription(uwh.getDescription());
127
			uwhr.setDescription(uwh.getDescription());
135
			walletHistoryResponse.add(uwhr);
128
			walletHistoryResponse.add(uwhr);
136
		}
129
		}
137
		final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), request.getRequestURL().toString() , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, walletHistoryResponse);
130
		final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), request.getRequestURL().toString() , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, walletHistoryResponse);