Subversion Repositories SmartDukaan

Rev

Rev 25265 | Rev 25547 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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;
24739 tejbeer 31
	public void refundToWallet(Integer retailerId, Float amountToRefund, Integer transactionId,
32
			WalletReferenceType walletReferenceType, String description) throws ProfitMandiBusinessException;
24509 amit.gupta 33
 
22550 ashik.ali 34
}