Subversion Repositories SmartDukaan

Rev

Rev 22859 | Rev 23504 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.service.wallet;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Service;

import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;

import in.shop2020.model.v1.order.WalletReferenceType;

@Service
public interface WalletService {
        public void addAmountToWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount) throws ProfitMandiBusinessException;
        public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType, String description, float amount) throws ProfitMandiBusinessException;
        UserWallet getUserWalletByUserId(int userId) throws ProfitMandiBusinessException;
        List<UserWalletHistory> getUserWalletHistoryByUserId(int userId) throws ProfitMandiBusinessException;
        List<UserWalletHistory> getUserWalletHistoryByRetailerId(int retailerId) throws ProfitMandiBusinessException;
        public List<UserWalletHistory> getPaginatedUserWalletHistoryByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime, int offset, int limit) throws ProfitMandiBusinessException;
        public long getSizeByRetailerId(int retailerId, LocalDateTime startDateTime, LocalDateTime endDateTime) throws ProfitMandiBusinessException;
        public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds);
}