| 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,
|