package com.crm.pay.service;


import com.crm.rely.backend.core.exception.ServiceException;

import java.math.BigDecimal;

public interface FinanceRateService {

    /**
     * 获取汇率
     *
     * @param currency
     * @param transformCurrency
     * @param type
     * @return
     * @throws ServiceException
     */
    BigDecimal getRate(String currency, String transformCurrency, Integer type) throws ServiceException;

    BigDecimal getRate(String currency, String transformCurrency, Integer type, Integer t) throws ServiceException;

    BigDecimal getRateAmount(String currency, String transformCurrency, BigDecimal amount) throws ServiceException;

    /**
     * 获取汇率转换货币金额
     *
     * @param currency
     * @param transformCurrency
     * @param type
     * @param amount
     * @return
     * @throws ServiceException
     */
    BigDecimal getRateAmount(String currency, String transformCurrency, Integer type, BigDecimal amount) throws ServiceException;

    BigDecimal getRateAmount(String currency, String transformCurrency, Integer type, BigDecimal amount,
                             Integer t) throws ServiceException;
}
