| Line 10... |
Line 10... |
| 10 |
import org.slf4j.LoggerFactory;
|
10 |
import org.slf4j.LoggerFactory;
|
| 11 |
import org.springframework.beans.factory.annotation.Autowired;
|
11 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 12 |
import org.springframework.stereotype.Component;
|
12 |
import org.springframework.stereotype.Component;
|
| 13 |
|
13 |
|
| 14 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
14 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 15 |
import com.spice.profitmandi.dao.entity.dtr.UserAccounts;
|
15 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
| 16 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
16 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
| 17 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
17 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
| 18 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
18 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
| 19 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
19 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 20 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
20 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
| Line 70... |
Line 70... |
| 70 |
}
|
70 |
}
|
| 71 |
|
71 |
|
| 72 |
|
72 |
|
| 73 |
@Override
|
73 |
@Override
|
| 74 |
public UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException {
|
74 |
public UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException {
|
| 75 |
UserAccounts userAccount = userAccountRepository.getUserAccountByType(userId, AccountType.saholic);
|
75 |
UserAccount userAccount = userAccountRepository.selectByUserIdType(userId, AccountType.saholic);
|
| 76 |
return userWalletRepository.selectByRetailerId(Integer.valueOf(userAccount.getAccount_key()));
|
76 |
return userWalletRepository.selectByRetailerId(Integer.valueOf(userAccount.getAccountKey()));
|
| 77 |
}
|
77 |
}
|
| 78 |
|
78 |
|
| 79 |
@Override
|
79 |
@Override
|
| 80 |
public List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException {
|
80 |
public List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException {
|
| 81 |
UserWallet userWallet = this.getUserWalletByUserId(userId);
|
81 |
UserWallet userWallet = this.getUserWalletByUserId(userId);
|