Subversion Repositories SmartDukaan

Rev

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

Rev 24089 Rev 24584
Line 76... Line 76...
76
	@ApiImplicitParams({
76
	@ApiImplicitParams({
77
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
77
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
78
	@ApiOperation(value = "")
78
	@ApiOperation(value = "")
79
	public ResponseEntity<?> getMyWallet(HttpServletRequest request) throws ProfitMandiBusinessException {
79
	public ResponseEntity<?> getMyWallet(HttpServletRequest request) throws ProfitMandiBusinessException {
80
		int userId = (int) request.getAttribute("userId");
80
		int userId = (int) request.getAttribute("userId");
-
 
81
		boolean underMaintainance = true;
-
 
82
		if(underMaintainance) {
-
 
83
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
-
 
84
		}
81
		try {
85
		try {
82
			return responseSender.ok(walletService.getUserWalletByUserId(userId));
86
			return responseSender.ok(walletService.getUserWalletByUserId(userId));
83
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
87
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
84
			return responseSender.badRequest(profitMandiBusinessException);
88
			return responseSender.badRequest(profitMandiBusinessException);
85
		}
89
		}
Line 87... Line 91...
87
 
91
 
88
	@RequestMapping(value = ProfitMandiConstants.URL_MY_WALLET_HISTORY, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
92
	@RequestMapping(value = ProfitMandiConstants.URL_MY_WALLET_HISTORY, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
89
	@ApiImplicitParams({
93
	@ApiImplicitParams({
90
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
94
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
91
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request) throws ProfitMandiBusinessException {
95
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request) throws ProfitMandiBusinessException {
-
 
96
		boolean underMaintainance = true;
-
 
97
		if(underMaintainance) {
-
 
98
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
-
 
99
		}
92
		int userId = (int) request.getAttribute("userId");
100
		int userId = (int) request.getAttribute("userId");
93
		try {
101
		try {
94
			return responseSender.ok(walletService.getUserWalletHistoryByUserId(userId));
102
			return responseSender.ok(walletService.getUserWalletHistoryByUserId(userId));
95
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
103
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
96
			return responseSender.badRequest(profitMandiBusinessException);
104
			return responseSender.badRequest(profitMandiBusinessException);