Subversion Repositories SmartDukaan

Rev

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

Rev 24584 Rev 24597
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;
81
		/*boolean underMaintainance = true;
82
		if(underMaintainance) {
82
		if(underMaintainance) {
83
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
83
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
84
		}
84
		}*/
85
		try {
85
		try {
86
			return responseSender.ok(walletService.getUserWalletByUserId(userId));
86
			return responseSender.ok(walletService.getUserWalletByUserId(userId));
87
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
87
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
88
			return responseSender.badRequest(profitMandiBusinessException);
88
			return responseSender.badRequest(profitMandiBusinessException);
89
		}
89
		}
Line 91... Line 91...
91
 
91
 
92
	@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)
93
	@ApiImplicitParams({
93
	@ApiImplicitParams({
94
			@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") })
95
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request) throws ProfitMandiBusinessException {
95
	public ResponseEntity<?> getMyWalletHistory(HttpServletRequest request) throws ProfitMandiBusinessException {
96
		boolean underMaintainance = true;
96
		/*boolean underMaintainance = true;
97
		if(underMaintainance) {
97
		if(underMaintainance) {
98
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
98
			return responseSender.badRequest(new ProfitMandiBusinessException(null, null, "Wallet is under maintainance, please try after"));
99
		}
99
		}*/
100
		int userId = (int) request.getAttribute("userId");
100
		int userId = (int) request.getAttribute("userId");
101
		try {
101
		try {
102
			return responseSender.ok(walletService.getUserWalletHistoryByUserId(userId));
102
			return responseSender.ok(walletService.getUserWalletHistoryByUserId(userId));
103
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
103
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
104
			return responseSender.badRequest(profitMandiBusinessException);
104
			return responseSender.badRequest(profitMandiBusinessException);