| 22550 |
ashik.ali |
1 |
package com.spice.profitmandi.service.wallet;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
import java.util.List;
|
| 23110 |
ashik.ali |
5 |
import java.util.Map;
|
|
|
6 |
import java.util.Set;
|
| 22550 |
ashik.ali |
7 |
|
|
|
8 |
import org.springframework.stereotype.Service;
|
|
|
9 |
|
|
|
10 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
|
|
11 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
|
|
12 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
|
|
13 |
|
| 22859 |
ashik.ali |
14 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
|
|
15 |
|
| 22550 |
ashik.ali |
16 |
@Service
|
|
|
17 |
public interface WalletService {
|
| 22859 |
ashik.ali |
18 |
public void addAmountToWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount) throws ProfitMandiBusinessException;
|
|
|
19 |
public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount) throws ProfitMandiBusinessException;
|
| 22550 |
ashik.ali |
20 |
UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException;
|
| 23509 |
amit.gupta |
21 |
UserWallet getUserWallet(int retailerId) throws ProfitMandiBusinessException;
|
| 22550 |
ashik.ali |
22 |
List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException;
|
|
|
23 |
List<UserWalletHistory> getUserWalletHistoryByRetailerId(int retailerId) throws ProfitMandiBusinessException;
|
|
|
24 |
public List<UserWalletHistory> getPaginatedUserWalletHistoryByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime, int offset, int limit) throws ProfitMandiBusinessException;
|
|
|
25 |
public long getSizeByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime) throws ProfitMandiBusinessException;
|
| 23110 |
ashik.ali |
26 |
public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds);
|
| 23509 |
amit.gupta |
27 |
public void rollbackAmountFromWallet(int fofoId, float amountToRollback, int rollbackReference, WalletReferenceType walletReferenceType,
|
| 25266 |
amit.gupta |
28 |
String rollbackReason) throws ProfitMandiBusinessException;
|
| 23504 |
ashik.ali |
29 |
public boolean isExistWalletHistory(int retailerId, int referenceId, WalletReferenceType referenceType) throws ProfitMandiBusinessException;
|
| 24509 |
amit.gupta |
30 |
public float getOpeningTill(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException;
|
| 26256 |
amit.gupta |
31 |
public boolean refundToWallet(Integer retailerId, Float amountToRefund, Integer transactionId,
|
| 24739 |
tejbeer |
32 |
WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException;
|
| 25547 |
amit.gupta |
33 |
public int getWalletAmount(int retailerId) throws ProfitMandiBusinessException;
|
| 25609 |
amit.gupta |
34 |
List<UserWalletHistory> getAllByReference(int fofoId, int reference, WalletReferenceType walletReferenceType) throws ProfitMandiBusinessException;
|
| 24509 |
amit.gupta |
35 |
|
| 22550 |
ashik.ali |
36 |
}
|