| 22550 |
ashik.ali |
1 |
package com.spice.profitmandi.service.wallet;
|
|
|
2 |
|
| 30677 |
amit.gupta |
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
|
|
4 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
|
|
5 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
|
|
6 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
|
|
7 |
import org.springframework.stereotype.Service;
|
|
|
8 |
|
| 22550 |
ashik.ali |
9 |
import java.time.LocalDateTime;
|
|
|
10 |
import java.util.List;
|
| 23110 |
ashik.ali |
11 |
import java.util.Map;
|
|
|
12 |
import java.util.Set;
|
| 22550 |
ashik.ali |
13 |
|
|
|
14 |
@Service
|
|
|
15 |
public interface WalletService {
|
| 26498 |
amit.gupta |
16 |
public void addAmountToWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
17 |
|
| 26498 |
amit.gupta |
18 |
public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
19 |
|
| 22550 |
ashik.ali |
20 |
UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
21 |
|
| 23509 |
amit.gupta |
22 |
UserWallet getUserWallet(int retailerId) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
23 |
|
| 22550 |
ashik.ali |
24 |
List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
25 |
|
| 22550 |
ashik.ali |
26 |
List<UserWalletHistory> getUserWalletHistoryByRetailerId(int retailerId) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
27 |
|
| 22550 |
ashik.ali |
28 |
public List<UserWalletHistory> getPaginatedUserWalletHistoryByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime, int offset, int limit) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
29 |
|
| 22550 |
ashik.ali |
30 |
public long getSizeByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime) throws ProfitMandiBusinessException;
|
| 30889 |
amit.gupta |
31 |
|
| 23110 |
ashik.ali |
32 |
public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds);
|
| 30677 |
amit.gupta |
33 |
|
| 30889 |
amit.gupta |
34 |
void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
|
|
|
35 |
String description, float amount, LocalDateTime businessTime, boolean forced) throws ProfitMandiBusinessException;
|
|
|
36 |
|
| 23509 |
amit.gupta |
37 |
public void rollbackAmountFromWallet(int fofoId, float amountToRollback, int rollbackReference, WalletReferenceType walletReferenceType,
|
| 30677 |
amit.gupta |
38 |
String rollbackReason, LocalDateTime businessTime) throws ProfitMandiBusinessException;
|
|
|
39 |
|
| 23504 |
ashik.ali |
40 |
public boolean isExistWalletHistory(int retailerId, int referenceId, WalletReferenceType referenceType) throws ProfitMandiBusinessException;
|
| 30677 |
amit.gupta |
41 |
|
| 24509 |
amit.gupta |
42 |
public float getOpeningTill(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException;
|
| 30677 |
amit.gupta |
43 |
|
| 28517 |
amit.gupta |
44 |
public float getOpeningTillExcludingPurchase(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException;
|
| 30677 |
amit.gupta |
45 |
|
| 28241 |
amit.gupta |
46 |
public boolean refundToWallet(int retailerId, float amountToRefund, int transactionId,
|
| 30677 |
amit.gupta |
47 |
WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException;
|
|
|
48 |
|
| 25547 |
amit.gupta |
49 |
public int getWalletAmount(int retailerId) throws ProfitMandiBusinessException;
|
| 30677 |
amit.gupta |
50 |
|
| 25609 |
amit.gupta |
51 |
List<UserWalletHistory> getAllByReference(int fofoId, int reference, WalletReferenceType walletReferenceType) throws ProfitMandiBusinessException;
|
| 30677 |
amit.gupta |
52 |
|
| 28596 |
amit.gupta |
53 |
Map<Integer, Integer> getWaleltRetailerMap(Set<Integer> retailerIds);
|
| 30677 |
amit.gupta |
54 |
|
|
|
55 |
void resetWallet() throws ProfitMandiBusinessException;
|
| 32494 |
amit.gupta |
56 |
|
|
|
57 |
int getManualReference(WalletReferenceType referenceType);
|
| 22550 |
ashik.ali |
58 |
}
|