Subversion Repositories SmartDukaan

Rev

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

Rev 26256 Rev 26498
Line 13... Line 13...
13
 
13
 
14
import in.shop2020.model.v1.order.WalletReferenceType;
14
import in.shop2020.model.v1.order.WalletReferenceType;
15
 
15
 
16
@Service
16
@Service
17
public interface WalletService {
17
public interface WalletService {
18
	public void addAmountToWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount) throws ProfitMandiBusinessException;
18
	public void addAmountToWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException;
19
	public void consumeAmountFromWallet(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, LocalDateTime businessTime) throws ProfitMandiBusinessException;
20
	UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException;
20
	UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException;
21
	UserWallet getUserWallet(int retailerId) throws ProfitMandiBusinessException;
21
	UserWallet getUserWallet(int retailerId) throws ProfitMandiBusinessException;
22
	List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException;
22
	List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException;
23
	List<UserWalletHistory> getUserWalletHistoryByRetailerId(int retailerId) 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;
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;
25
	public long getSizeByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime) throws ProfitMandiBusinessException;
26
	public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds);
26
	public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds);
27
	public void rollbackAmountFromWallet(int fofoId, float amountToRollback, int rollbackReference, WalletReferenceType walletReferenceType,
27
	public void rollbackAmountFromWallet(int fofoId, float amountToRollback, int rollbackReference, WalletReferenceType walletReferenceType,
28
			String rollbackReason) throws ProfitMandiBusinessException;
28
			String rollbackReason, LocalDateTime businessTime) throws ProfitMandiBusinessException;
29
	public boolean isExistWalletHistory(int retailerId, int referenceId, WalletReferenceType referenceType) throws ProfitMandiBusinessException;
29
	public boolean isExistWalletHistory(int retailerId, int referenceId, WalletReferenceType referenceType) throws ProfitMandiBusinessException;
30
	public float getOpeningTill(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException;
30
	public float getOpeningTill(int fofoId, LocalDateTime date) throws ProfitMandiBusinessException;
31
	public boolean refundToWallet(Integer retailerId, Float amountToRefund, Integer transactionId,
31
	public boolean refundToWallet(Integer retailerId, Float amountToRefund, Integer transactionId,
32
			WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException;
32
			WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException;
33
	public int getWalletAmount(int retailerId) throws ProfitMandiBusinessException;
33
	public int getWalletAmount(int retailerId) throws ProfitMandiBusinessException;