Subversion Repositories SmartDukaan

Rev

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

Rev 28596 Rev 29498
Line 57... Line 57...
57
			return;
57
			return;
58
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
58
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
59
		int walletAmount = walletService.getWalletAmount(retailerId);
59
		int walletAmount = walletService.getWalletAmount(retailerId);
60
		// userWallet = userWalletRepository.selectByIdForUpdate(userWallet.getId());
60
		// userWallet = userWalletRepository.selectByIdForUpdate(userWallet.getId());
61
		userWallet.setAmount(walletAmount + Math.round(amount));
61
		userWallet.setAmount(walletAmount + Math.round(amount));
62
		userWalletRepository.persist(userWallet);
-
 
63
		this.createUserWalletHistory(Math.round(amount), userWallet.getId(), referenceId, referenceType, description, businessTime);
62
		this.createUserWalletHistory(Math.round(amount), userWallet.getId(), referenceId, referenceType, description, businessTime);
64
	}
63
	}
65
 
64
 
66
	@Override
65
	@Override
67
	public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
66
	public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,